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 hyperdx from '@site/static/images/use-cases/observability/hyperdx-1.png';
14
13
import hyperdx_20 from '@site/static/images/use-cases/observability/hyperdx-20.png';
15
-
import hyperdx_3 from '@site/static/images/use-cases/observability/hyperdx-3.png';
16
-
import hyperdx_4 from '@site/static/images/use-cases/observability/hyperdx-4.png';
17
14
import hyperdx_21 from '@site/static/images/use-cases/observability/hyperdx-21.png';
18
15
import hyperdx_22 from '@site/static/images/use-cases/observability/hyperdx-22.png';
19
16
import hyperdx_23 from '@site/static/images/use-cases/observability/hyperdx-23.png';
20
-
import copy_api_key from '@site/static/images/use-cases/observability/copy_api_key.png';
21
17
22
-
This getting started guide allows you collect local logs and metrics from your system, sending them to ClickStack for visualization and analysis.
18
+
This getting started guide allows you to collect local logs and metrics from your system, sending them to ClickStack for visualization and analysis.
23
19
24
20
**This example works on OSX and Linux systems only**
25
21
26
-
The following example assumes you have started ClickStack using the [instructions for the all-in-one image](/use-cases/observability/clickstack/getting-started) and connected to the [local ClickHouse instance](/use-cases/observability/clickstack/getting-started#complete-connection-credentials) or a [ClickHouse Cloud instance](/use-cases/observability/clickstack/getting-started#create-a-cloud-connection).
27
-
28
22
:::note HyperDX in ClickHouse Cloud
29
-
This sample dataset can also be used with HyperDX in ClickHouse Cloud, with only minor adjustments to the flow as noted. If using HyperDX in ClickHouse Cloud, users will require an Open Telemetry collector to be running locally as described in the [getting started guide for this deployment model](/use-cases/observability/clickstack/deployment/hyperdx-clickhouse-cloud).
23
+
This sample dataset can also be used with HyperDX in ClickHouse Cloud, with only minor adjustments to the flow as noted. If using HyperDX in ClickHouse Cloud, users will require an OpenTelemetry collector to be running locally as described in the [getting started guide for this deployment model](/use-cases/observability/clickstack/deployment/hyperdx-clickhouse-cloud).
30
24
:::
31
25
32
26
<VerticalStepper>
33
27
34
-
## Navigate to the HyperDX UI {#navigate-to-the-hyperdx-ui}
35
-
36
-
Visit [http://localhost:8080](http://localhost:8080) to access the HyperDX UI if deploying locally. If using HyperDX in ClickHouse Cloud, select your service and `HyperDX` from the left menu.
28
+
## Create a custom OpenTelemetry configuration {#create-otel-configuration}
37
29
38
-
## Copy ingestion API key {#copy-ingestion-api-key}
39
-
40
-
:::note HyperDX in ClickHouse Cloud
41
-
This step is not required if using HyperDX in ClickHouse Cloud.
42
-
:::
43
-
44
-
Navigate to [`Team Settings`](http://localhost:8080/team) and copy the `Ingestion API Key` from the `API Keys` section. This API key ensures data ingestion through the OpenTelemetry collector is secure.
45
-
46
-
<Imageimg={copy_api_key}alt="Copy API key"size="lg"/>
47
-
48
-
## Create a local OpenTelemetry configuration {#create-otel-configuration}
49
-
50
-
Create a `otel-local-file-collector.yaml` file with the following content.
51
-
52
-
**Important**: Populate the value `<YOUR_INGESTION_API_KEY>` with your ingestion API key copied above (not required for HyperDX in ClickHouse Cloud).
30
+
Create a `custom-local-config.yaml` file with the following content:
53
31
54
32
```yaml
55
33
receivers:
56
34
filelog:
57
35
include:
58
-
- /var/log/**/*.log # Linux
59
-
- /var/log/syslog
60
-
- /var/log/messages
61
-
- /private/var/log/*.log # macOS
62
-
- /tmp/all_events.log # macos - see below
63
-
start_at: beginning # modify to collect new files only
36
+
- /host/var/log/**/*.log # Linux logs from host
37
+
- /host/var/log/syslog
38
+
- /host/var/log/messages
39
+
- /host/private/var/log/*.log # macOS logs from host
This configuration collects system logs and metric for OSX and Linux systems, sending the results to ClickStack via the OTLP endpoint on port 4317.
96
+
This configuration collects system logs and metrics for OSX and Linux systems, sending the results to ClickStack. The configuration extends the ClickStack collector by adding new receivers and pipelines—you reference the existing `clickhouse` exporter and processors (`memory_limiter`, `batch`) that are already configured in the base ClickStack collector.
122
97
123
98
:::note Ingestion timestamps
124
99
This configuration adjusts timestamps at ingest, assigning an updated time value to each event. Users should ideally [preprocess or parse timestamps](/use-cases/observability/clickstack/ingesting-data/otel-collector#processing-filtering-transforming-enriching) using OTel processors or operators in their log files to ensure accurate event time is retained.
@@ -130,33 +105,53 @@ To avoid this behavior, you can set the start position to `end` in the receiver
130
105
131
106
For more details on the OpenTelemetry (OTel) configuration structure, we recommend [the official guide](https://opentelemetry.io/docs/collector/configuration/).
132
107
133
-
:::note Detailed logs for OSX
134
-
Users wanting more detailed logs on OSX can run the command `log stream --debug --style ndjson >> /tmp/all_events.log` before starting the collector below. This will capture detailed operating system logs to the file `/tmp/all_events.log`, already included in the above configuration.
135
-
:::
136
-
137
-
## Start the collector {#start-the-collector}
108
+
## Start ClickStack with custom configuration {#start-clickstack}
138
109
139
-
Run the following docker command to start an instance of the OTel collector.
110
+
Run the following docker command to start the all-in-one container with your custom configuration:
We run the collector as the root user to access all system logs—this is necessary to capture logs from protected paths on Linux-based systems. However, this approach is not recommended for production. In production environments, the OpenTelemetry Collector should be deployed as a local agent with only the minimal permissions required to access the intended log sources.
125
+
126
+
Note that we mount the host's `/var/log` to `/host/var/log` inside the container to avoid conflicts with the container's own log files.
153
127
:::
154
128
129
+
If using HyperDX in ClickHouse Cloud with a standalone collector, use this command instead:
The collector will immediately begin collecting local system logs and metrics.
156
147
148
+
## Navigate to the HyperDX UI {#navigate-to-the-hyperdx-ui}
149
+
150
+
Visit [http://localhost:8080](http://localhost:8080) to access the HyperDX UI if deploying locally. If using HyperDX in ClickHouse Cloud, select your service and `HyperDX` from the left menu.
151
+
157
152
## Explore system logs {#explore-system-logs}
158
153
159
-
Navigate to the HyperDX UI. The search UI should be populated with local system logs. Expand the filters to select the `system.log`:
154
+
The search UI should be populated with local system logs. Expand the filters to select the `system.log`:
160
155
161
156
<Image img={hyperdx_20} alt="HyperDX Local logs" size="lg"/>
162
157
@@ -180,4 +175,4 @@ From the subsequent menu you can select `Percentage` from the `Output format` dr
180
175
181
176
<Image img={hyperdx_23} alt="Memory % of time" size="lg"/>
Currently, the ClickStack distribution of the OTel collector does not support modification of its configuration file. If you need a more complex configuration e.g. [configuring TLS](#securing-the-collector), or modifying the batch size, we recommend copying and modifying the [default configuration](https://github.com/hyperdxio/hyperdx/blob/main/docker/otel-collector/config.yaml) and deploying your own version of the OTel collector using the ClickHouse exporter documented [here](/observability/integrating-opentelemetry#exporting-to-clickhouse) and [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/clickhouseexporter/README.md#configuration-options).
103
+
The ClickStack distribution of the OTel collector supports extending the base 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.
104
104
105
-
The default ClickStack configuration for the OpenTelemetry (OTel) collector can be found [here](https://github.com/hyperdxio/hyperdx/blob/main/docker/otel-collector/config.yaml).
105
+
#### Extending the collector configuration {#extending-collector-config}
106
+
107
+
To add custom receivers, processors, or pipelines:
108
+
109
+
1. Create a custom configuration file with your additional configuration
110
+
2. Mount the file at `/etc/otelcol-contrib/custom.config.yaml`
111
+
3. Set the environment variable `CUSTOM_OTELCOL_CONFIG_FILE=/etc/otelcol-contrib/custom.config.yaml`
You only define new receivers, processors, and pipelines in the custom config. The base processors (`memory_limiter`, `batch`) and exporters (`clickhouse`) are already defined—reference them by name. The custom configuration is merged with the base configuration and cannot override existing components.
190
+
:::
191
+
192
+
For more complex configurations, refer to the [default ClickStack collector configuration](https://github.com/hyperdxio/hyperdx/blob/main/docker/otel-collector/config.yaml) and the [ClickHouse exporter documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/clickhouseexporter/README.md#configuration-options).
@@ -120,7 +207,7 @@ To further secure your deployment, we recommend:
120
207
121
208
- Configuring the collector to communicate with ClickHouse over HTTPS.
122
209
- Create a dedicated user for ingestion with limited permissions - see below.
123
-
- Enabling TLS for the OTLP endpoint, ensuring encrypted communication between SDKs/agents and the collector. **Currently, this requires users to deploy a default distribution of the collector and manage the configuration themselves**.
210
+
- Enabling TLS for the OTLP endpoint, ensuring encrypted communication between SDKs/agents and the collector. This can be configured via [custom collector configuration](#extending-collector-config).
124
211
125
212
### Creating an ingestion user {#creating-an-ingestion-user}
126
213
@@ -276,7 +363,7 @@ However, if you require high delivery guarantees or the ability to replay data (
276
363
In this case, OTel agents can be configured to send data to Kafka via the [Kafka exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/kafkaexporter/README.md). Gateway instances, in turn, consume messages using the [Kafka receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/kafkareceiver/README.md). We recommend the Confluent and OTel documentation for further details.
277
364
278
365
:::note OTel collector configuration
279
-
The ClickStack OpenTelemetry collector distribution cannot be used with Kafka as it requires a configuration modification. Users will need to deploy a default OTel collector using the ClickHouse exporter.
366
+
The ClickStack OpenTelemetry collector distribution can be configured with Kafka using [custom collector configuration](#extending-collector-config).
0 commit comments