Local Logs & Metrics
This getting started guide allows you collect local logs and metrics from your system, sending them to ClickStack for visualization and analysis.
This example works on OSX and Linux systems only
The following example assumes you have started ClickStack using the instructions for the all-in-one image and connected to the local ClickHouse instance or a ClickHouse Cloud instance.
Navigate to the HyperDX UI
Visit http://localhost:8080 to access the HyperDX UI.
Copy ingestion API key
Navigate to Team Settings
and copy the Ingestion API Key
from the API Keys
section. This API key ensures data ingestion through the OpenTelemetry collector is secure.
Create a local OpenTelemetry configuration
Create a otel-file-collector.yaml
file with the following content.
Important: Populate the value <YOUR_INGESTION_API_KEY>
with your ingestion API key copied above.
This configuration collects system logs and metric for OSX and Linux systems, sending the results to ClickStack via the OTLP endpoint on port 4317.
This configuration adjusts timestamps at ingest, assigning an updated time value to each event. Users should ideally preprocess or parse timestamps using OTel processors or operators in their log files to ensure accurate event time is retained.
With this example setup, if the receiver or file processor is configured to start at the beginning of the file, all existing log entries will be assigned the same adjusted timestamp - the time of processing rather than the original event time. Any new events appended to the file will receive timestamps approximating their actual generation time.
To avoid this behavior, you can set the start position to end
in the receiver configuration. This ensures only new entries are ingested and timestamped near their true arrival time.
For more details on the OpenTelemetry (OTel) configuration structure, we recommend the official guide.
Start the collector
Run the following docker command to start an instance of the OTel collector.
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.
The collector will immediately begin collecting local system logs and metrics.
Explore system logs
Navigate to the HyperDX UI. The search UI should be populated with local system logs. Expand the filters to select the system.log
:
Explore system metrics
We can explore our metrics using charts.
Navigate to the Chart Explorer via the left menu. Select the source Metrics
and Maximum
as the aggregation type.
For the Select a Metric
menu simply type memory
before selecting system.memory.utilization (Gauge)
.
Press the run button to visualize your memory utilization over time.
Note the number is returned as a floating point %
. To render it more clearly, select Set number format
.
From the subsequent menu you can select Percentage
from the Output format
drop down before clicking Apply
.