I'm getting JSON response from my target which i would be logging to Bambi.
I could trace the logs and could see it is a valid JSON. However, when i'm sending it to log the same, i'm getting a PARSING error.
I'm just adding another KEY/value pair to this message and nothing else.
I'm getting a valid JSON from my target server. (As below, OUTPUT)
Output:
{"report":{"Info":[{"Link":"No","Info":{"comments":"Req comments","BOFDate":""},"Loc":"Morning","Area":"RUGE","id":"21-OCEAN-03-01","Type":"SLOW","Info":{"FlipDate":"2019-Aug","comments":"calling","DipDate":""},"averageCategory":"1 above"}],"area":{"Zonal":9,"idir":"Welling123"}}}
Im appending a log to this and below is the final one.
{"log-point": "RESPONSE", "response": {"report":{"Info":[{"Link":"No","Info":{"comments":"Req comments","BOFDate":""},"Loc":"Morning","Area":"RUGE","id":"21-OCEAN-03-01","Type":"SLOW","Info":{"FlipDate":"2019-Aug","comments":"calling","DipDate":""},"averageCategory":"1 above"}],"area":{"Zonal":9,"idir":"Welling123"}}} }
However, i'm getting below error....
@malformed_message: This log record is malformed as it could not be parsed as JSON. The escaped message has been included under the @syslog_raw_message attribute (ignore the prepended timestamp). Consider JSON linting a sample of your typical logged message. @syslog_facility: user @syslog_raw_message: <14>Thu Jul{"tag":{"org":"telstra-org006","env":"slot5","proxy-name":"nbnco-b2b-fw-reports-v1","proxy-rev":"16","basepath":"/v1/roads/street","path":"/v0/vc-roads/streetName","message": {"log-point": "RESPONSE", "response": {
Can someone pls help me out..
,
Im getting a valid JSON from my target server. (As below, OUTPUT)
Output:
{"report":{"Info":[{"Link":"No","Info":{"comments":"Req comments","BOFDate":""},"Loc":"Morning","Area":"RUGE","id":"21-OCEAN-03-01","Type":"SLOW","Info":{"FlipDate":"2019-Aug","comments":"calling","DipDate":""},"averageCategory":"1 above"}],"area":{"Zonal":9,"idir":"Welling123"}}}
{"log-point": "RESPONSE", "response": {"report":{"Info":[{"Link":"No","Info":{"comments":"Req comments","BOFDate":""},"Loc":"Morning","Area":"RUGE","id":"21-OCEAN-03-01","Type":"SLOW","Info":{"FlipDate":"2019-Aug","comments":"calling","DipDate":""},"averageCategory":"1 above"}],"area":{"Zonal":9,"idir":"Welling123"}}} }
However, im getting below error....
@malformed_message: This log record is malformed as it could not be parsed as JSON. The escaped message has been included under the @syslog_raw_message attribute (ignore the prepended timestamp). Consider JSON linting a sample of your typical logged message.
@syslog_facility: user
@syslog_raw_message: <14>Thu Jul{"tag":{"org":"telstra-org006","env":"slot5","proxy-name":"nbnco-b2b-fw-reports-v1","proxy-rev":"16","basepath":"/v1/roads/street","path":"/v0/vc-roads/streetName","message": {"log-point": "RESPONSE", "response": {
Can someone pls help me out..
Yeah, you're gonna need to provide more information.
I can GUESS , from the error you showed below your statement
im getting below error
...is that you are trying to use a MessageLogging policy. But it's just a guess. Am I right? Are you using a MessageLogging policy? Something else ? What is connecting to the Syslog server, and how?
Provide some additional DETAIL and we can try to help you.
Without any additional detail I Can say this: The syslog server is telling you your message is invalid.
If you give me (us) additional detail, we might be able to provide more help.
Answer by Varun Raghuwanshi · 5 days ago
Looks like the JSON contains Duplicate key "Info" which may be hindering the parser, @PK
Please tell me how to change log output location 3 Answers
Logrotating edge-message-processor.log 2 Answers
Apigee Edge Logging 2 Answers
message logging using KVM approach 1 Answer
on apigee edge on-premise - how do i reset a user password via the API 2 Answers