Configure Loggly with multiple tags

Not applicable
Dear community, I want to send error logging from Apigee Edge Cloud to Loggly, but I am experiencing difficulties. I want to make a post API call to Loggly using the format displayed below (tags2.jpg). This is a Google Chrome Postman request. 1074-tags2.jpg This gives the following outcome in Loggly, which is correct: 1076-tags1.jpg Currently, I have configured the following in Apigee Edge, as displayed in the following screenshot ( tags3.jpg). 1075-tags3.jpg But this gives the following result in Loggly, which is incorrect: 1077-tags4.jpg How can I configure Apigee in such a way that my request is composed as the first Postman request?
Solved Solved
0 18 2,008
2 ACCEPTED SOLUTIONS

Not applicable

I managed to successfully send (error) messages from Apigee to Loggly by using a ServiceCallOut instead of a MessageLogging policy.

1094-loggly.jpg

In Loggly it looks like below and I am now able to easily filter all messages on customer, api and environment.

1095-loggly2.jpg

View solution in original post

Above issue has been resolved in latest release, You can now post formatted messages into loggly using message logging policy instead of service callout policy. For more details , please see article by @tskumar@apigee.com here.

View solution in original post

18 REPLIES 18

Hi @ferry.bos, Check this out, https://www.loggly.com/docs/streaming-syslog-witho... So, you should be able to add mutliple tags like this, [mykey@xxxx tag="foo" tag="{apiproxy.name}"] Thanks,

Hi @Mukundha Madhavan, Thanks for your answer. The tags are not received/processed properly in Loggly with the message policy below. Can you specify how the policy should look like in Apigee?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="Log-error-details">
  <DisplayName>Log error details</DisplayName>
    <Syslog>
      <Message>[mykey@41058 tag="{apiproxy.name}"]
        \{ 
  "target":  "{target.name}",
  "environment.name": "{environment.name}",
  "apikey":  "{client_id}",
  "developer": "{verifyapikey.verify-api-key.DisplayName}",
  "requestverb": "{request.verb}",
  "request.path": "{request.path}", 
  "request.querystring": "{request.querystring}",
  "statuscode":"{response.status.code}",
  "response": "{response.content}"
  }
  </Message>
  <Host>logs-01.loggly.com</Host>
  <Port>514</Port>
  <Protocol>UDP</Protocol>
  </Syslog>
</MessageLogging>

I haven't tried but from the doc it looks like this should have worked, i just added few sample tags - hope this helps!
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="Log-error-details">
  <DisplayName>Log error details</DisplayName>
    <Syslog>
      <Message>[mykey@41058 tag="{apiproxy.name}" tag="foo" tag="bar" tag="{organization.name}"]
        \{ 
  "target":  "{target.name}",
  "environment.name": "{environment.name}",
  "apikey":  "{client_id}",
  "developer": "{verifyapikey.verify-api-key.DisplayName}",
  "requestverb": "{request.verb}",
  "request.path": "{request.path}", 
  "request.querystring": "{request.querystring}",
  "statuscode":"{response.status.code}",
  "response": "{response.content}"
  }
  </Message>
  <Host>logs-01.loggly.com</Host>
  <Port>514</Port>
  <Protocol>UDP</Protocol>
  </Syslog>
</MessageLogging>



Unfortunately it doesn't work.

The complete content within the Message element is received as body text.

It looks like the tag properties are not sent properly to Loggly.

yeah, sorry for the confusion - check Anil's answer -- looks like that is the problem

Dear @ferry.bos ,

Welcome to Apigee Community.

I can able to reproduce same issue. It's not working as expected. I believe it's an issue due to "RFC5424 compliant header" that Apigee sends to loggly.

Ideally it should be something like below,

<165>1 2003-10-11T22:14:15.003Z mymachine.example.com
           evntslog - ID47 [exampleSDID@32473 iut="3" eventSource=
           "Application" eventID="1011"]

But what we see in loggly is something like below..

<14>Fri Sep 04 09:40:26 UTC 2015Info: [mykey@41058 tag="foo" tage="bar"]

We will keep you updated if any findings regarding same.

Cheers,

Anil Sagar

Hi Anil,

Is there any status update on the fix for this issue? We're running into the same thing when using the MessageLogging Policy to send logs to Loggly.

Using a ServiceCallout like @ferry.bos suggested would fix the issue but we won't be able to use it in a PostClientFlow. Would appreciate any advice/update on this. Thanks!

@Anil Sagar

@sudheendra1,

@Peter Johnson,

Hi all, same here. I am also interested in an update on this issue. See thread: https://community.apigee.com/comments/15613/view.html Regards, Rob

Not applicable

I managed to successfully send (error) messages from Apigee to Loggly by using a ServiceCallOut instead of a MessageLogging policy.

1094-loggly.jpg

In Loggly it looks like below and I am now able to easily filter all messages on customer, api and environment.

1095-loggly2.jpg

@ferry.bos , Thank you for posting a solution for same. Yes, Service callout is always an option to resolve above issue. But, Problem still exists with Message Logging policy. We will follow up on same and keep you posted. Thank you once again for sharing solution with community here.

We are experiencing the same issue also. Don't want to use a service callout because we want to take advantage of the PostClientFlow and service callouts aren't allowed there.

Please let us know when fixed.

@paulmartin , We have fixed this issue. It will be available in next release. we will keep you posted.

@tskumar@apigee.com , Any idea when will be the next release?

@Anil Sagar first/second week of april tentatively.

Awesome, Thank you for the quick update.

@paulmartin , Issue has been fixed. Please check article here.

Above issue has been resolved in latest release, You can now post formatted messages into loggly using message logging policy instead of service callout policy. For more details , please see article by @tskumar@apigee.com here.