Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JSON messages in RDS #1

Open
mostlyjason opened this issue May 15, 2017 · 0 comments
Open

Add support for JSON messages in RDS #1

mostlyjason opened this issue May 15, 2017 · 0 comments

Comments

@mostlyjason
Copy link

Sadequl Hussain

I am no Node programmer, but I have had a look at the Lambda code from the AWS console and if it is the Lambda function which is escaping these quotes, it should be in line 74, where the data is prepared to be sent to Loggly:

    // get all the events, stringify them and join them
    // with the new line character which can be sent to Loggly
    // via bulk endpoint
    const finalEvent = parsedEvents.map(JSON.stringify).join('\n');

I suspect the stringify operator needs to cater for special character like double-quotes which are being passed from AWS. The operator takes two other optional parameters - not sure if that can help in stripping the double quotes.

I also believe the RDS enhanced monitoring logs are unique in the sense that they are in JSON format and using quotation marks for the keys. Other CloudWatch logs might be in plain text which can explain why the Lambda function has no issues sending them to Loggly without any escape characters.

Thanks

Sadeq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant