{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by PK · Jul 11, 2019 at 02:28 PM · 125 Views apigee edgelogging

API Logging Error : JSON from PROXY is throwing error, Failing to parse JSON response from target

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"}}}

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, 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..

Comment
Add comment Show 1
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dino-at-Google ♦♦   · Jul 16, 2019 at 02:48 AM 0
Link

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.

Close

1 Answer

  • Sort: 
avatar image
0

Answer by Varun Raghuwanshi · 5 days ago

Looks like the JSON contains Duplicate key "Info" which may be hindering the parser, @PK

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

131 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

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

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges