Skip to content

Commit cd3d101

Browse files
authored
Merge pull request #4661 from ClickHouse/redis-logs-guide
Redis logs guide
2 parents 690b9c3 + c453569 commit cd3d101

24 files changed

+476
-77
lines changed

docs/use-cases/observability/clickstack/integration-examples/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ quick start guides for various log and trace sources.
1313

1414
| Section | Description |
1515
|------|-------------|
16-
| [Nginx Logs](./nginx-logs.md) | Introduction to data ingestion methods and architecture |
17-
| [Nginx Traces](./nginx-traces.md) | Introduction to data ingestion methods and architecture |
16+
| [Nginx Logs](./nginx-logs.md) | Quick start guide for Nginx logs |
17+
| [Nginx Traces](./nginx-traces.md) | Quick start guide for nginx traces |
18+
| [Redis](./redis-logs.md) | Quick start guide for Redis logs |

docs/use-cases/observability/clickstack/integration-examples/nginx-logs.md

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
slug: /use-cases/observability/clickstack/integrations/nginx
3-
title: 'Monitoring nginx Logs with ClickStack'
4-
sidebar_label: 'nginx Logs'
3+
title: 'Monitoring nginx logs with ClickStack'
4+
sidebar_label: 'nginx logs'
55
pagination_prev: null
66
pagination_next: null
77
description: 'Monitoring nginx with ClickStack'
@@ -11,38 +11,40 @@ doc_type: 'guide'
1111
import Image from '@theme/IdealImage';
1212
import useBaseUrl from '@docusaurus/useBaseUrl';
1313
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';
1616
import log_view from '@site/static/images/clickstack/log-view.png';
1717
import search_view from '@site/static/images/clickstack/nginx-logs-search-view.png';
18+
import { TrackedLink } from '@site/src/components/GalaxyTrackedLink/GalaxyTrackedLink';
1819

19-
# Monitoring nginx Logs with ClickStack {#nginx-clickstack}
20+
# Monitoring nginx logs with ClickStack {#nginx-clickstack}
2021

2122
:::note[TL;DR]
2223
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:
2324

2425
- Configure nginx to output JSON-formatted logs
2526
- Create a custom OTel collector configuration for log ingestion
2627
- 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
2829

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.
3031

31-
Time Required: 5-10 minutes.
32+
Time Required: 5-10 minutes
3233
:::
3334

34-
## Prerequisites {#prerequisites}
35-
- ClickStack instance running
36-
- Existing nginx installation
37-
- Access to modify nginx configuration files
38-
3935
## Integration with existing nginx {#existing-nginx}
4036

4137
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).
4239

43-
<VerticalStepper>
40+
##### Prerequisites {#prerequisites}
41+
- ClickStack instance running
42+
- Existing nginx installation
43+
- Access to modify nginx configuration files
4444

45-
## Configure nginx log format {#configure-nginx}
45+
<VerticalStepper headerLevel="h4">
46+
47+
#### Configure nginx log format {#configure-nginx}
4648
First, configure nginx to output logs in JSON format for easier parsing. Add this log format definition to your nginx.conf:
4749

4850
The `nginx.conf` file is typically located at:
@@ -75,7 +77,7 @@ http {
7577

7678
After making this change, reload nginx.
7779

78-
## Create custom otel collector configuration {#custom-otel}
80+
#### Create custom OTel collector configuration {#custom-otel}
7981

8082
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.
8183

@@ -125,15 +127,15 @@ This configuration:
125127
- The pipelines route data from your receivers to the ClickHouse exporter via the existing processors
126128
:::
127129
128-
## Configure ClickStack to load custom configuration {#load-custom}
130+
#### Configure ClickStack to load custom configuration {#load-custom}
129131
130132
To enable custom collector configuration in your existing ClickStack deployment, you must:
131133
132134
1. Mount the custom config file at /etc/otelcol-contrib/custom.config.yaml
133135
2. Set the environment variable CUSTOM_OTELCOL_CONFIG_FILE=/etc/otelcol-contrib/custom.config.yaml
134136
3. Mount your nginx log directories so the collector can read them
135137
136-
### Option 1: Docker Compose {#docker-compose}
138+
##### Option 1: Docker Compose {#docker-compose}
137139
138140
Update your ClickStack deployment configuration:
139141
```yaml
@@ -149,7 +151,7 @@ services:
149151
# ... other volumes ...
150152
```
151153

152-
### Option 2: Docker Run (All-in-One Image) {#all-in-one}
154+
##### Option 2: Docker Run (All-in-One Image) {#all-in-one}
153155

154156
If using the all-in-one image with docker run:
155157
```bash
@@ -165,11 +167,11 @@ docker run --name clickstack \
165167
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.
166168
:::
167169

168-
## Verifying Logs in ClickStack {#verifying-logs}
170+
#### Verifying Logs in HyperDX {#verifying-logs}
169171
Once configured, log into HyperDX and verify logs are flowing:
170172

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.
173175

174176
This is an example of what you should see:
175177

@@ -183,25 +185,22 @@ This is an example of what you should see:
183185

184186
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.
185187

186-
<VerticalStepper>
187-
188-
## Download the sample dataset {#download-sample}
188+
<VerticalStepper headerLevel="h4">
189189

190-
Download the sample log file and update timestamps to the current time:
190+
#### Download the sample dataset {#download-sample}
191191

192192
```bash
193193
# Download the logs
194194
curl -O https://datasets-documentation.s3.eu-west-3.amazonaws.com/clickstack-integrations/access.log
195195
```
196196

197197
The dataset includes:
198-
- 10,000 log entries with realistic traffic patterns
198+
- Log entries with realistic traffic patterns
199199
- Various endpoints and HTTP methods
200200
- Mix of successful requests and errors
201201
- Realistic response times and byte counts
202-
- Timestamps now distributed over recent time
203202

204-
## Create test collector configuration {#test-config}
203+
#### Create test collector configuration {#test-config}
205204

206205
Create a file named `nginx-demo.yaml` with the following configuration:
207206

@@ -236,7 +235,7 @@ service:
236235
EOF
237236
```
238237

239-
## Run ClickStack with demo configuration {#run-demo}
238+
#### Run ClickStack with demo configuration {#run-demo}
240239

241240
Run ClickStack with the demo logs and configuration:
242241

@@ -249,18 +248,18 @@ docker run --name clickstack-demo \
249248
docker.hyperdx.io/hyperdx/hyperdx-all-in-one:latest
250249
```
251250

252-
## Verify logs in HyperDX {#verify-demo-logs}
251+
#### Verify logs in HyperDX {#verify-demo-logs}
253252

254253
Once ClickStack is running (you may have to create an account and login first):
255254

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:
257258

258259
:::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.
260261
:::
261262

262-
Here's what you should see in your search view:
263-
264263
<Image img={search_view} alt="Log view"/>
265264

266265
<Image img={log_view} alt="Log view"/>
@@ -271,10 +270,11 @@ Here's what you should see in your search view:
271270

272271
To help you get started monitoring nginx with ClickStack, we provide essential visualizations for nginx logs.
273272

274-
<VerticalStepper>
275-
## <a href={useBaseUrl('/examples/example-logs-dashboard.json')} download="nginx-logs-dashboard.json">Download</a> the dashboard configuration.
273+
<VerticalStepper headerLevel="h4">
276274

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}
278278
1. Open HyperDX and navigate to the Dashboards section.
279279
2. Click "Import Dashboard" in the upper right corner under the ellipses.
280280

@@ -284,7 +284,11 @@ To help you get started monitoring nginx with ClickStack, we provide essential v
284284

285285
<Image img={finish_import} alt="Finish Import"/>
286286

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.
291+
:::
288292

289293
<Image img={example_dashboard} alt="Example Dashboard"/>
290294

docs/use-cases/observability/clickstack/integration-examples/nginx-traces.md

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
22
slug: /use-cases/observability/clickstack/integrations/nginx-traces
3-
title: 'Monitoring nginx Traces with ClickStack'
4-
sidebar_label: 'nginx Traces'
3+
title: 'Monitoring nginx traces with ClickStack'
4+
sidebar_label: 'nginx traces'
55
pagination_prev: null
66
pagination_next: null
7-
description: 'Monitoring nginx Traces with ClickStack'
7+
description: 'Monitoring nginx traces with ClickStack'
88
doc_type: 'guide'
99
keywords: ['ClickStack', 'nginx', 'traces', 'otel']
1010
---
1111

1212
import Image from '@theme/IdealImage';
1313
import useBaseUrl from '@docusaurus/useBaseUrl';
1414
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';
1717
import view_traces from '@site/static/images/clickstack/nginx-traces-search-view.png';
18+
import { TrackedLink } from '@site/src/components/GalaxyTrackedLink/GalaxyTrackedLink';
1819

19-
# Monitoring nginx Traces with ClickStack {#nginx-traces-clickstack}
20+
# Monitoring nginx traces with ClickStack {#nginx-traces-clickstack}
2021

2122
:::note[TL;DR]
2223
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
2627
- Verify traces are appearing in HyperDX
2728
- Use a pre-built dashboard to visualize request performance (latency, errors, throughput)
2829

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.
3131

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+
::::
3734

3835
## Integration with existing nginx {#existing-nginx}
3936

4037
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).
4139

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
44+
- ClickStack hostname or IP address
4345

44-
## Install OpenTelemetry nginx module {#install-module}
46+
<VerticalStepper headerLevel="h4">
47+
48+
#### Install OpenTelemetry nginx module {#install-module}
4549

4650
The easiest way to add tracing to nginx is using the official nginx image with OpenTelemetry support built-in.
4751

48-
### Using the nginx:otel image {#using-otel-image}
52+
##### Using the nginx:otel image {#using-otel-image}
4953

5054
Replace your current nginx image with the OpenTelemetry-enabled version:
5155

@@ -60,7 +64,7 @@ This image includes the `ngx_otel_module.so` pre-installed and ready to use.
6064
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.
6165
:::
6266

63-
## Configure nginx to send traces to ClickStack {#configure-nginx}
67+
#### Configure nginx to send traces to ClickStack {#configure-nginx}
6468

6569
Add OpenTelemetry configuration to your `nginx.conf` file. The configuration loads the module and directs traces to ClickStack's OTLP endpoint.
6670

@@ -132,7 +136,7 @@ Replace `<clickstack-host>` with your ClickStack instance hostname or IP address
132136
- Change **otel_service_name** to match your environment for easier identification in HyperDX
133137
:::
134138

135-
### Understanding the configuration {#understanding-configuration}
139+
##### Understanding the configuration {#understanding-configuration}
136140

137141
**What gets traced:**
138142
Each request to nginx creates a trace span showing:
@@ -158,7 +162,7 @@ docker-compose restart nginx
158162
sudo systemctl reload nginx
159163
```
160164

161-
## Verifying Traces in ClickStack {#verifying-traces}
165+
#### Verifying traces in HyperDX {#verifying-traces}
162166

163167
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:
164168

@@ -170,9 +174,9 @@ Once configured, log into HyperDX and verify traces are flowing, you should see
170174

171175
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.
172176

173-
<VerticalStepper>
177+
<VerticalStepper headerLevel="h4">
174178

175-
## Start ClickStack {#start-clickstack}
179+
#### Start ClickStack {#start-clickstack}
176180

177181
If you don't have ClickStack running yet, start it with:
178182

@@ -188,7 +192,7 @@ Wait about 30 seconds for ClickStack to fully initialize before proceeding.
188192
- Port 4317: OTLP gRPC endpoint (used by nginx module)
189193
- Port 4318: OTLP HTTP endpoint (used for demo traces)
190194

191-
## Download the sample dataset {#download-sample}
195+
#### Download the sample dataset {#download-sample}
192196

193197
Download the sample traces file and update timestamps to the current time:
194198

@@ -204,7 +208,7 @@ The dataset includes:
204208
- Latencies ranging from 10ms to 800ms
205209
- Original traffic patterns preserved, shifted to current time
206210

207-
## Send traces to ClickStack {#send-traces}
211+
#### Send traces to ClickStack {#send-traces}
208212

209213
Set your API key as an environment variable (if not already set):
210214

@@ -232,16 +236,16 @@ This demo assumes ClickStack is running locally on `localhost:4318`. For remote
232236

233237
You should see a response like `{"partialSuccess":{}}` indicating the traces were successfully sent. All 1,000 traces will be ingested into ClickStack.
234238

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=[])
236242

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:
238244

239245
:::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.
241247
:::
242248

243-
Here's what you should see in your search view:
244-
245249
<Image img={view_traces} alt="View Traces"/>
246250

247251
</VerticalStepper>
@@ -250,11 +254,11 @@ Here's what you should see in your search view:
250254

251255
To help you get started monitoring traces with ClickStack, we provide essential visualizations for trace data.
252256

253-
<VerticalStepper>
257+
<VerticalStepper headerLevel="h4">
254258

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}
256260

257-
## Import the pre-built dashboard {#import-dashboard}
261+
#### Import the pre-built dashboard {#import-dashboard}
258262
1. Open HyperDX and navigate to the Dashboards section.
259263
2. Click "Import Dashboard" in the upper right corner under the ellipses.
260264

@@ -264,7 +268,11 @@ To help you get started monitoring traces with ClickStack, we provide essential
264268

265269
<Image img={finish_import} alt="Finish Import"/>
266270

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.
275+
:::
268276

269277
<Image img={example_dashboard} alt="Example Dashboard"/>
270278

0 commit comments

Comments
 (0)