-
Notifications
You must be signed in to change notification settings - Fork 392
Initial Version of nginx guide #4588
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
…into clickstack-nginx-guide
…into clickstack-nginx-guide
<VerticalStepper> | ||
|
||
## Configure nginx log format {#configure-nginx} | ||
First, configure nginx to output logs in JSON format for easier parsing. Add this log format definition to your nginx.conf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indicate where this is often found
- ./nginx-monitoring.yaml:/etc/otelcol-contrib/custom.config.yaml:ro | ||
- /var/log/nginx:/var/log/nginx:ro | ||
# ... other volumes ... | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also provide a docker command example of doing this i.e. for the all in one image
1. Navigate to the Logs view | ||
2. Filter by source:nginx to see only nginx logs | ||
3. Verify you see JSON-parsed log entries with fields like request_method, request_uri, status, etc. | ||
</VerticalStepper> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image!!!!
|
||
### Custom config not loading {#troubleshooting-not-loading} | ||
|
||
- Verify the environment variable CUSTOM_OTELCOL_CONFIG_FILE is set correctly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add simple commands to verify these
|
||
## Using the Sample Dataset {#using-data} | ||
|
||
1. [Download](../../../../../static/examples/nginx-sample-logs.json) and place the sample file in `/tmp/nginx-demo/access.log` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think we need to be prescriptive about the location i.e. can't it just be in the folder we launch from?
-e CUSTOM_OTELCOL_CONFIG_FILE=/etc/otelcol-contrib/custom.config.yaml \ | ||
-v "$(pwd)/nginx-demo.yaml:/etc/otelcol-contrib/custom.config.yaml:ro" \ | ||
-v /tmp/nginx-demo:/tmp/nginx-demo:ro \ | ||
docker.hyperdx.io/hyperdx/hyperdx-all-in-one:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wont work surely? we need to mount in the log file as well
- Filter by `source:nginx-demo` | ||
- Set time range to last 24 hours | ||
- You should see ~10,000 log entries | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image!
|
||
You can query the data to verify patterns: | ||
|
||
```shell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont think we need
|
||
## Dashboards and visualization {#dashboards} | ||
|
||
To help you get started monitoring nginx with ClickStack, we provide a pre-built dashboard with essential nginx metrics and visualizations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
essential visualizations for nginx logs
Summary
nginx set up guide for clickstack
Checklist