Unparsed Message With MessageLogging to Loggly

Not applicable

I have the following MessageLogging policy setup:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="Log-Message">
    <DisplayName>Log Message</DisplayName>
    <Syslog>
        <Message>[{myCustomerToken}@41058] Testing 123...</Message>
        <Host>logs-01.loggly.com</Host>
        <Port>514</Port>
        <Protocol>UDP</Protocol>
    </Syslog>
</MessageLogging>

In my real policy {myCustomerToken} is replaced with a hard-coded value. When it runs, I get the messages into my Loggly account, but they are showing up as "unparsed" and not being identified as Syslogs. Any ideas on what I'm doing wrong?

Solved Solved
1 9 746
1 ACCEPTED SOLUTION

@Dan Fearing , @Cladius Fernando , @Diego Zuluaga ,

Issue with Message Logging Policy & Syslog format has been resolved. Tags feature should work now while using message logging policy. For more details, check article here.

View solution in original post

9 REPLIES 9

Not applicable

Hi @Dan Fearing . Did you try the approach from @Ricardo de Andrade posted in this article? It sounds as if you could leverage tags to flag those entries. Alternatively, you can also leverage Winston -Loggly Node.js to send logs from APIs running on Edge. Here's a tutorial with a proof of concept.

Unfortunately the tags don't work because it's not identifying it as a Syslog, so the tags never get parsed.

I'd rather not use node.js to handle the integration since Apigee recommends you use their built in policies over writing custom code and according to their documentation, this policy is suppose to integrate with Loggly.

I could be wrong, but I feel like there is a problem between Apigee and Loggly.

Hi @Dan Fearing, I believe you are right about the problem related to tags. I am experiencing the same issue. The tag attribute configured within the message logging policy is being treated as part of the message. Does anyone on this forum know of a possible solution for this?

Thanks for checking Claudius and Dan. I'd consider trying it out on Node.js still. There's nothing wrong on leveraging Node.js for handling logging. But if this is indeed a bug, you're absolutely right, it should fixed so you can leverage XML policies.

Also, @Sudheer Gopalam suggested as a workaround trying to generate the string with the tags in a JavaScript policy and storing it in a variable and use that variable from the MessageLogging policy.

@arghya das and @Peter Johnson do you happen to know anyone from engineering who can weigh in here?

@Diego Zuluaga, could you please get this logged as an issue with the apigee product team?

I'd encourage you to open a Support ticket @Cladius Fernando. Especially, given that you might be currently working for a customer or a partner and can replicate it more quickly.

Hi @Diego Zuluaga, there is a JIRA ticket logged for this internally with the apigee product team. @AMAR DEVEGOWDA, can provide more updates on the ticket's status.

So...any chance of getting this fixed?

@Dan Fearing , @Cladius Fernando , @Diego Zuluaga ,

Issue with Message Logging Policy & Syslog format has been resolved. Tags feature should work now while using message logging policy. For more details, check article here.