-
Notifications
You must be signed in to change notification settings - Fork 103
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
Implement Grok Rules in logstack application #4234
Comments
both
|
pushed to |
By setting up the space-drain in development, all apps log from development can be sent to New Relic now. Dev/Staging/Prod currently use one logstash shipper from
|
some related topics to parse log using Grok: |
After fixed plugins and new_relic key etc issues, now set up separate instances of the logstack-shipper app in each environment ( |
the original message before any New Relic parsing rules: Grok rule: Grok output:
Required fields:
|
discussed with Fuhu, for CKAN log message, there are more required field need to be extracted: Format one:
Format two:
|
Those extra fields show up in development space. Will review it with @FuhuXia to see if we need more. |
@FuhuXia I added grok rule to separate the request, please check on development space: |
Discussed with Fuhu, we will implement the following changes:
|
The Nginx log messages were excluded and are no longer present in the New Relic logs. Additionally, the log from logstack-shipper only contains logs associated with non-200 response codes. |
We can deploy the changes on prod and find the new crawler agent(s) which is responsible for the recent increased tracking traffic. Previously it can only be done via lengthy cloudfront log processing. |
couple of changes need to modified from the grok rules:
Also, only keep fields raw_message_content, log_data in development space for debug purpose. Reference for the field name: https://djangocas.dev/blog/nginx/nginx-access-log-with-real-x-forwarded-for-ip-instead-of-proxy-ip/ |
Another big benefit from this grok change is that we can set grok rule to ignore certain white-noise logs. As of now 78% of all logs (based of December 2023 data, 958,729,889 of 1,216,483,493) are logstack-shipper POST/200 logs that offer 0 value to us. NR log query will be faster without them.
|
Fixed the deploy related issues and have PR GSA/datagov-logstack#48 here. @FuhuXia |
confirmed from New Relic, all changes are in prod and other environments now. |
User Story
In order to have better control of log streams in NR, the Data.gov Response Team wants to implement application-specific routing rules in our datagov-logstack app.
Acceptance Criteria
WHEN I check NR
THEN I see different streams/parsing rules applied to each type of app logs
Background
Security Considerations (required)
This is supposed to help with log review processes.
Sketch
The text was updated successfully, but these errors were encountered: