You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/use-cases/observability/clickstack/integration-examples/nginx-logs.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ import search_view from '@site/static/images/clickstack/nginx-logs-search-view.p
18
18
19
19
# Monitoring Nginx Logs with ClickStack {#nginx-clickstack}
20
20
21
-
::::note[TL;DR]
21
+
:::note[TL;DR]
22
22
This guide shows you how to monitor nginx with ClickStack by configuring the OpenTelemetry collector to ingest nginx access logs. You'll learn how to:
23
23
24
24
- Configure nginx to output JSON-formatted logs
@@ -29,7 +29,7 @@ This guide shows you how to monitor nginx with ClickStack by configuring the Ope
29
29
A demo dataset with 10,000 sample logs is provided to test the integration before connecting your production nginx instances.
30
30
31
31
Time Required: 5-10 minutes.
32
-
::::
32
+
:::
33
33
34
34
## Prerequisites {#prerequisites}
35
35
- ClickStack instance running
@@ -118,12 +118,12 @@ This configuration:
118
118
- Adds source: nginx attribute for filtering in HyperDX
119
119
- Routes logs to the ClickHouse exporter via a dedicated pipeline
120
120
121
-
::::note
121
+
:::note
122
122
- You only define new receivers and pipelines in the custom config
123
123
- The processors (memory_limiter, transform, batch) and exporters (clickhouse) are already defined in the base ClickStack configuration - you just reference them by name
124
124
- The time_parser operator extracts timestamps from nginx's time_local field to preserve original log timing
125
125
- The pipelines route data from your receivers to the ClickHouse exporter via the existing processors
126
-
::::
126
+
:::
127
127
128
128
## Configure ClickStack to load custom configuration {#load-custom}
129
129
@@ -161,9 +161,9 @@ docker run --name clickstack \
Ensure the ClickStack collector has appropriate permissions to read the nginx log files. In production, use read-only mounts (:ro) and follow the principle of least privilege.
166
-
::::
166
+
:::
167
167
168
168
## Verifying Logs in ClickStack {#verifying-logs}
169
169
Once configured, log into HyperDX and verify logs are flowing:
@@ -255,9 +255,9 @@ Once ClickStack is running (you may have to create an account and login first):
255
255
256
256
1. Open [HyperDX](http://localhost:8080/search?from=1760976000000&to=1761062400000&isLive=false&source=690235c1a9b7fc5a7c0fffc7&select=Timestamp,ServiceName,SeverityText,Body&where=&whereLanguage=lucene&filters=[]&orderBy=)
257
257
258
-
::::note
258
+
:::note
259
259
It is important to use the link above to get the correct time range, if you don't use this link set your time range to Oct 20 11:00:00 - Oct 21 11:00:00 to see proper results.
260
-
::::
260
+
:::
261
261
262
262
Here's what you should see in your search view:
263
263
@@ -274,7 +274,7 @@ To help you get started monitoring nginx with ClickStack, we provide essential v
274
274
<VerticalStepper>
275
275
## <a href={useBaseUrl('/examples/example-logs-dashboard.json')} download="nginx-logs-dashboard.json">Download</a> the dashboard configuration.
276
276
277
-
## Import Pre-built Dashboard {#import-dashboard}
277
+
## Import the pre-built dashboard {#import-dashboard}
278
278
1. Open HyperDX and navigate to the Dashboards section.
279
279
2. Click "Import Dashboard" in the upper right corner under the ellipses.
@@ -17,7 +18,7 @@ import view_traces from '@site/static/images/clickstack/nginx-traces-search-view
17
18
18
19
# Monitoring Nginx Traces with ClickStack {#nginx-traces-clickstack}
19
20
20
-
::::note[TL;DR]
21
+
:::note[TL;DR]
21
22
This guide shows you how to capture distributed traces from your existing nginx installation and visualize them in ClickStack. You'll learn how to:
22
23
23
24
- Add the OpenTelemetry module to nginx
@@ -26,7 +27,7 @@ This guide shows you how to capture distributed traces from your existing nginx
26
27
- Use a pre-built dashboard to visualize request performance (latency, errors, throughput)
27
28
28
29
Time Required: 5-10 minutes.
29
-
::::
30
+
:::
30
31
31
32
## Prerequisites {#prerequisites}
32
33
- ClickStack instance running with OTLP endpoints accessible (ports 4317/4318)
@@ -55,9 +56,9 @@ image: nginx:1.27-otel
55
56
56
57
This image includes the `ngx_otel_module.so` pre-installed and ready to use.
57
58
58
-
::::note
59
+
:::note
59
60
If you're running nginx outside of Docker, refer to the [OpenTelemetry nginx documentation](https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/nginx) for manual installation instructions.
60
-
::::
61
+
:::
61
62
62
63
## Configure nginx to send traces to ClickStack {#configure-nginx}
63
64
@@ -125,13 +126,13 @@ services:
125
126
126
127
Replace `<clickstack-host>` with your ClickStack instance hostname or IP address.
127
128
128
-
::::note
129
+
:::note
129
130
- **Port 4317** is the gRPC endpoint used by the nginx module
130
131
- **otel_service_name** should be descriptive of your nginx instance (e.g., "api-gateway", "frontend-proxy")
131
132
- Change **otel_service_name** to match your environment for easier identification in HyperDX
132
-
::::
133
+
:::
133
134
134
-
### Understanding the Configuration {#understanding-configuration}
135
+
### Understanding the configuration {#understanding-configuration}
135
136
136
137
**What gets traced:**
137
138
Each request to nginx creates a trace span showing:
@@ -225,19 +226,19 @@ curl -X POST http://localhost:4318/v1/traces \
225
226
-d @nginx-traces-sample.json
226
227
```
227
228
228
-
::::note[Running on localhost]
229
+
:::note[Running on localhost]
229
230
This demo assumes ClickStack is running locally on `localhost:4318`. For remote instances, replace `localhost` with your ClickStack hostname.
230
-
::::
231
+
:::
231
232
232
233
You should see a response like `{"partialSuccess":{}}` indicating the traces were successfully sent. All 1,000 traces will be ingested into ClickStack.
233
234
234
235
## Verify traces in HyperDX {#verify-demo-traces}
235
236
236
237
1. Open [HyperDX](http://localhost:8080/search?from=1761501600000&to=1761588000000&isLive=false&source=69023d1b4f1d41a964641b09&where=&select=Timestamp,ServiceName,StatusCode,round(Duration/1e6),SpanName&whereLanguage=lucene&orderBy=&filters=[])
237
238
238
-
::::note
239
+
:::note
239
240
It is important to use the link above to get the correct time range, if you don't use this link set your time range to Oct 26 13:00:00 - Oct 27 13:00:00 to see proper results.
240
-
::::
241
+
:::
241
242
242
243
Here's what you should see in your search view:
243
244
@@ -253,7 +254,7 @@ To help you get started monitoring traces with ClickStack, we provide essential
253
254
254
255
## <a href={useBaseUrl('/examples/example-traces.json')} download="example-traces.json">Download</a> the dashboard configuration. {#download}
255
256
256
-
## Import Pre-built Dashboard {#import-dashboard}
257
+
## Import the pre-built dashboard {#import-dashboard}
257
258
1. Open HyperDX and navigate to the Dashboards section.
258
259
2. Click "Import Dashboard" in the upper right corner under the ellipses.
259
260
@@ -307,7 +308,7 @@ Look for OpenTelemetry-related errors.
307
308
tail -f /var/log/nginx/access.log
308
309
```
309
310
310
-
## Next Steps {#next-steps}
311
+
## Next steps {#next-steps}
311
312
If you want to explore further, here are some next steps to experiment with your dashboard
312
313
313
314
- Set up alerts for critical metrics (error rates, latency thresholds)
0 commit comments