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
import import_dashboard from '@site/static/images/clickstack/import-dashboard.png';
14
-
import finish_import from '@site/static/images/clickstack/finish-import.png';
15
-
import example_dashboard from '@site/static/images/clickstack/example-logs-dashboard.png';
14
+
import finish_import from '@site/static/images/clickstack/finish-nginx-logs-import.png';
15
+
import example_dashboard from '@site/static/images/clickstack/nginx-logs-dashboard.png';
16
16
import log_view from '@site/static/images/clickstack/log-view.png';
17
17
import search_view from '@site/static/images/clickstack/nginx-logs-search-view.png';
18
+
import { TrackedLink } from '@site/src/components/GalaxyTrackedLink/GalaxyTrackedLink';
18
19
19
-
# Monitoring nginx Logs with ClickStack {#nginx-clickstack}
20
+
# Monitoring nginx logs with ClickStack {#nginx-clickstack}
20
21
21
22
:::note[TL;DR]
22
23
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
24
24
25
- Configure nginx to output JSON-formatted logs
25
26
- Create a custom OTel collector configuration for log ingestion
26
27
- Deploy ClickStack with your custom configuration
27
-
- Use a pre-built dashboard to visualize nginx metrics (requests, errors, latency)
28
+
- Use a pre-built dashboard to visualize nginx metrics
28
29
29
-
A demo dataset with 10,000 sample logs is provided to test the integration before connecting your production nginx instances.
30
+
A demo dataset with sample logs is available if you want to test the integration before configuring your production nginx.
30
31
31
-
Time Required: 5-10 minutes.
32
+
Time Required: 5-10 minutes
32
33
:::
33
34
34
-
## Prerequisites {#prerequisites}
35
-
- ClickStack instance running
36
-
- Existing nginx installation
37
-
- Access to modify nginx configuration files
38
-
39
35
## Integration with existing nginx {#existing-nginx}
40
36
41
37
This section covers configuring your existing nginx installation to send logs to ClickStack by modifying the ClickStack OTel collector configuration.
38
+
If you would like to test the integration before configuring your own existing setup, you can test with our preconfigured setup and sample data in the [following section](/use-cases/observability/clickstack/integrations/nginx#demo-dataset).
42
39
43
-
<VerticalStepper>
40
+
##### Prerequisites {#prerequisites}
41
+
- ClickStack instance running
42
+
- Existing nginx installation
43
+
- Access to modify nginx configuration files
44
44
45
-
## Configure nginx log format {#configure-nginx}
45
+
<VerticalStepperheaderLevel="h4">
46
+
47
+
#### Configure nginx log format {#configure-nginx}
46
48
First, configure nginx to output logs in JSON format for easier parsing. Add this log format definition to your nginx.conf:
ClickStack allows you to extend the base OpenTelemetry Collector configuration by mounting a custom configuration file and setting an environment variable. The custom configuration is merged with the base configuration managed by HyperDX via OpAMP.
81
83
@@ -125,15 +127,15 @@ This configuration:
125
127
- The pipelines route data from your receivers to the ClickHouse exporter via the existing processors
126
128
:::
127
129
128
-
## Configure ClickStack to load custom configuration {#load-custom}
130
+
#### Configure ClickStack to load custom configuration {#load-custom}
129
131
130
132
To enable custom collector configuration in your existing ClickStack deployment, you must:
131
133
132
134
1. Mount the custom config file at /etc/otelcol-contrib/custom.config.yaml
133
135
2. Set the environment variable CUSTOM_OTELCOL_CONFIG_FILE=/etc/otelcol-contrib/custom.config.yaml
134
136
3. Mount your nginx log directories so the collector can read them
135
137
136
-
### Option 1: Docker Compose {#docker-compose}
138
+
##### Option 1: Docker Compose {#docker-compose}
137
139
138
140
Update your ClickStack deployment configuration:
139
141
```yaml
@@ -149,7 +151,7 @@ services:
149
151
# ... other volumes ...
150
152
```
151
153
152
-
### Option 2: Docker Run (All-in-One Image) {#all-in-one}
154
+
#####Option 2: Docker Run (All-in-One Image) {#all-in-one}
153
155
154
156
If using the all-in-one image with docker run:
155
157
```bash
@@ -165,11 +167,11 @@ docker run --name clickstack \
165
167
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
168
:::
167
169
168
-
## Verifying Logs in ClickStack {#verifying-logs}
170
+
####Verifying Logs in HyperDX {#verifying-logs}
169
171
Once configured, log into HyperDX and verify logs are flowing:
170
172
171
-
1. Navigate to the Logs view
172
-
2.Verify you see JSON-parsed log entries with fields like request, request_time, upstream_response_time, etc.
173
+
1. Navigate to the search view
174
+
2.Set source to Logs, and verify you see log entries with fields like request, request_time, upstream_response_time, etc.
173
175
174
176
This is an example of what you should see:
175
177
@@ -183,25 +185,22 @@ This is an example of what you should see:
183
185
184
186
For users who want to test the nginx integration before configuring their production systems, we provide a sample dataset of pre-generated nginx access logs with realistic traffic patterns.
185
187
186
-
<VerticalStepper>
187
-
188
-
## Download the sample dataset {#download-sample}
188
+
<VerticalStepperheaderLevel="h4">
189
189
190
-
Download the sample log file and update timestamps to the current time:
190
+
#### Download the sample dataset {#download-sample}
Once ClickStack is running (you may have to create an account and login first):
255
254
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=)
255
+
1. Open [HyperDX with demo time range](http://localhost:8080/search?from=1760976000000&to=1761062400000&isLive=false&source=690235c1a9b7fc5a7c0fffc7&select=Timestamp,ServiceName,SeverityText,Body&where=&whereLanguage=lucene&filters=[]&orderBy=)
256
+
257
+
Here's what you should see in your search view:
257
258
258
259
:::note
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
+
If you don't see logs, ensure the time range is set to 2025-10-20 11:00:00 - 2025-10-21 11:00:00 and 'Logs' is selected as the source. Using the link is important to get the proper time range of results.
260
261
:::
261
262
262
-
Here's what you should see in your search view:
263
-
264
263
<Imageimg={search_view}alt="Log view"/>
265
264
266
265
<Imageimg={log_view}alt="Log view"/>
@@ -271,10 +270,11 @@ Here's what you should see in your search view:
271
270
272
271
To help you get started monitoring nginx with ClickStack, we provide essential visualizations for nginx logs.
273
272
274
-
<VerticalStepper>
275
-
## <a href={useBaseUrl('/examples/example-logs-dashboard.json')} download="nginx-logs-dashboard.json">Download</a> the dashboard configuration.
273
+
<VerticalStepperheaderLevel="h4">
276
274
277
-
## Import the pre-built dashboard {#import-dashboard}
275
+
#### <TrackedLink href={useBaseUrl('/examples/nginx-logs-dashboard.json')} download="nginx-logs-dashboard.json" eventName="docs.nginx_logs_monitoring.dashboard_download">Download</TrackedLink> the dashboard configuration {#download}
276
+
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.
280
280
@@ -284,7 +284,11 @@ To help you get started monitoring nginx with ClickStack, we provide essential v
284
284
285
285
<Imageimg={finish_import}alt="Finish Import"/>
286
286
287
-
## The dashboard will be created with all visualizations pre-configured. {#created-dashboard}
287
+
#### The dashboard will be created with all visualizations pre-configured {#created-dashboard}
288
+
289
+
:::note
290
+
Ensure the time range is set to 2025-10-20 11:00:00 - 2025-10-21 11:00:00. The imported dashboard will not have a time range specified by default.
import import_dashboard from '@site/static/images/clickstack/import-dashboard.png';
15
-
import finish_import from '@site/static/images/clickstack/finish-trace-dashboard.png';
16
-
import example_dashboard from '@site/static/images/clickstack/example-trace-dashboard.png';
15
+
import finish_import from '@site/static/images/clickstack/finish-nginx-traces-dashboard.png';
16
+
import example_dashboard from '@site/static/images/clickstack/nginx-traces-dashboard.png';
17
17
import view_traces from '@site/static/images/clickstack/nginx-traces-search-view.png';
18
+
import { TrackedLink } from '@site/src/components/GalaxyTrackedLink/GalaxyTrackedLink';
18
19
19
-
# Monitoring nginx Traces with ClickStack {#nginx-traces-clickstack}
20
+
# Monitoring nginx traces with ClickStack {#nginx-traces-clickstack}
20
21
21
22
:::note[TL;DR]
22
23
This guide shows you how to capture distributed traces from your existing nginx installation and visualize them in ClickStack. You'll learn how to:
@@ -26,26 +27,29 @@ This guide shows you how to capture distributed traces from your existing nginx
26
27
- Verify traces are appearing in HyperDX
27
28
- Use a pre-built dashboard to visualize request performance (latency, errors, throughput)
28
29
29
-
Time Required: 5-10 minutes.
30
-
:::
30
+
A demo dataset with sample traces is available if you want to test the integration before configuring your production nginx.
31
31
32
-
## Prerequisites {#prerequisites}
33
-
- ClickStack instance running with OTLP endpoints accessible (ports 4317/4318)
34
-
- Existing nginx installation (version 1.18 or higher)
35
-
- Root or sudo access to modify nginx configuration
36
-
- ClickStack hostname or IP address
32
+
Time Required: 5-10 minutes
33
+
::::
37
34
38
35
## Integration with existing nginx {#existing-nginx}
39
36
40
37
This section covers adding distributed tracing to your existing nginx installation by installing the OpenTelemetry module and configuring it to send traces to ClickStack.
38
+
If you would like to test the integration before configuring your own existing setup, you can test with our preconfigured setup and sample data in the [following section](/use-cases/observability/clickstack/integrations/nginx-traces#demo-dataset).
41
39
42
-
<VerticalStepper>
40
+
##### Prerequisites {#prerequisites}
41
+
- ClickStack instance running with OTLP endpoints accessible (ports 4317/4318)
42
+
- Existing nginx installation (version 1.18 or higher)
43
+
- Root or sudo access to modify nginx configuration
The easiest way to add tracing to nginx is using the official nginx image with OpenTelemetry support built-in.
47
51
48
-
### Using the nginx:otel image {#using-otel-image}
52
+
#####Using the nginx:otel image {#using-otel-image}
49
53
50
54
Replace your current nginx image with the OpenTelemetry-enabled version:
51
55
@@ -60,7 +64,7 @@ This image includes the `ngx_otel_module.so` pre-installed and ready to use.
60
64
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.
61
65
:::
62
66
63
-
## Configure nginx to send traces to ClickStack {#configure-nginx}
67
+
#### Configure nginx to send traces to ClickStack {#configure-nginx}
64
68
65
69
Add OpenTelemetry configuration to your `nginx.conf` file. The configuration loads the module and directs traces to ClickStack's OTLP endpoint.
66
70
@@ -132,7 +136,7 @@ Replace `<clickstack-host>` with your ClickStack instance hostname or IP address
132
136
- Change **otel_service_name** to match your environment for easier identification in HyperDX
133
137
:::
134
138
135
-
### Understanding the configuration {#understanding-configuration}
139
+
##### Understanding the configuration {#understanding-configuration}
136
140
137
141
**What gets traced:**
138
142
Each request to nginx creates a trace span showing:
@@ -158,7 +162,7 @@ docker-compose restart nginx
158
162
sudo systemctl reload nginx
159
163
```
160
164
161
-
## Verifying Traces in ClickStack {#verifying-traces}
165
+
#### Verifying traces in HyperDX {#verifying-traces}
162
166
163
167
Once configured, log into HyperDX and verify traces are flowing, you should see something like this, if you don't see traces, try adjusting your time range:
164
168
@@ -170,9 +174,9 @@ Once configured, log into HyperDX and verify traces are flowing, you should see
170
174
171
175
For users who want to test the nginx trace integration before configuring their production systems, we provide a sample dataset of pre-generated nginx traces with realistic traffic patterns.
172
176
173
-
<VerticalStepper>
177
+
<VerticalStepper headerLevel="h4">
174
178
175
-
## Start ClickStack {#start-clickstack}
179
+
#### Start ClickStack {#start-clickstack}
176
180
177
181
If you don't have ClickStack running yet, start it with:
178
182
@@ -188,7 +192,7 @@ Wait about 30 seconds for ClickStack to fully initialize before proceeding.
188
192
- Port 4317: OTLP gRPC endpoint (used by nginx module)
189
193
- Port 4318: OTLP HTTP endpoint (used for demo traces)
190
194
191
-
## Download the sample dataset {#download-sample}
195
+
#### Download the sample dataset {#download-sample}
192
196
193
197
Download the sample traces file and update timestamps to the current time:
194
198
@@ -204,7 +208,7 @@ The dataset includes:
204
208
- Latencies ranging from 10ms to 800ms
205
209
- Original traffic patterns preserved, shifted to current time
206
210
207
-
## Send traces to ClickStack {#send-traces}
211
+
#### Send traces to ClickStack {#send-traces}
208
212
209
213
Set your API key as an environment variable (if not already set):
210
214
@@ -232,16 +236,16 @@ This demo assumes ClickStack is running locally on `localhost:4318`. For remote
232
236
233
237
You should see a response like `{"partialSuccess":{}}` indicating the traces were successfully sent. All 1,000 traces will be ingested into ClickStack.
234
238
235
-
## Verify traces in HyperDX {#verify-demo-traces}
239
+
#### Verify traces in HyperDX {#verify-demo-traces}
240
+
241
+
1. Open [HyperDX with demo time range](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=[])
236
242
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=[])
243
+
Here's what you should see in your search view:
238
244
239
245
:::note
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.
246
+
If you don't see logs, ensure the time range is set to 2025-10-26 13:00:00 - 2025-10-27 13:00:00 and 'Logs' is selected as the source. Using the link is important to get the proper time range of results.
241
247
:::
242
248
243
-
Here's what you should see in your search view:
244
-
245
249
<Image img={view_traces} alt="View Traces"/>
246
250
247
251
</VerticalStepper>
@@ -250,11 +254,11 @@ Here's what you should see in your search view:
250
254
251
255
To help you get started monitoring traces with ClickStack, we provide essential visualizations for trace data.
252
256
253
-
<VerticalStepper>
257
+
<VerticalStepper headerLevel="h4">
254
258
255
-
## <a href={useBaseUrl('/examples/example-traces.json')} download="example-traces.json">Download</a> the dashboard configuration. {#download}
259
+
#### <TrackedLink href={useBaseUrl('/examples/nginx-traces-dashboard.json')} download="nginx-traces-dashboard.json" eventName="docs.nginx_traces_monitoring.dashboard_download">Download</TrackedLink> the dashboard configuration {#download}
256
260
257
-
## Import the pre-built dashboard {#import-dashboard}
261
+
#### Import the pre-built dashboard {#import-dashboard}
258
262
1. Open HyperDX and navigate to the Dashboards section.
259
263
2. Click "Import Dashboard" in the upper right corner under the ellipses.
260
264
@@ -264,7 +268,11 @@ To help you get started monitoring traces with ClickStack, we provide essential
264
268
265
269
<Image img={finish_import} alt="Finish Import"/>
266
270
267
-
## The dashboard will be created with all visualizations pre-configured. {#created-dashboard}
271
+
#### The dashboard will be created with all visualizations pre-configured. {#created-dashboard}
272
+
273
+
:::note
274
+
Ensure the time range is set to 2025-10-26 13:00:00 - 2025-10-27 13:00:00. The imported dashboard will not have a time range specified by default.
0 commit comments