Monitoring Host Logs with ClickStack
This guide shows you how to monitor host system logs with ClickStack by configuring the OpenTelemetry collector to collect logs from systemd, kernel, SSH, cron, and other system services. You'll learn how to:
- Configure the OTel collector to read system log files
- Deploy ClickStack with your custom configuration
- Use a pre-built dashboard to visualize host log insights (errors, warnings, service activity)
A demo dataset with sample logs is available if you want to test the integration before configuring your production hosts.
Time Required: 5-10 minutes
Integration with existing hosts
This section covers configuring your existing hosts to send system logs to ClickStack by modifying the ClickStack OTel collector configuration to read all system log files (syslog, auth, kernel, daemon, and application logs).
If you would like to test the host logs integration before configuring your own existing setup, you can test with our preconfigured setup and sample data in the "Demo dataset" section.
Prerequisites
- ClickStack instance running
- System with syslog files
- Access to modify ClickStack configuration files
Verify syslog files exist
First, verify that your system is writing syslog files:
Common syslog locations:
- Ubuntu/Debian:
/var/log/syslog - RHEL/CentOS/Fedora:
/var/log/messages - macOS:
/var/log/system.log
Create custom OTel collector configuration
ClickStack allows you to extend the base OpenTelemetry Collector configuration by mounting a custom configuration file and setting an environment variable.
Create a file named host-logs-monitoring.yaml with the configuration for your system:
- Modern Linux (Ubuntu 24.04+)
- Legacy Linux (Ubuntu 20.04, RHEL, CentOS)
- macOS
All configurations:
- Read syslog files from their standard locations
- Parse the syslog format to extract structured fields (timestamp, hostname, unit/service, PID, message)
- Preserve original log timestamps
- Add
source: host-logsattribute for filtering in HyperDX - Route logs to the ClickHouse exporter via a dedicated pipeline
- You only define new receivers and pipelines in the custom config
- The processors (
memory_limiter,transform,batch) and exporters (clickhouse) are already defined in the base ClickStack configuration - you just reference them by name - The regex parser extracts systemd unit names, PIDs, and other metadata from the syslog format
- This configuration uses
start_at: endto avoid re-ingesting logs on collector restarts. For testing, change tostart_at: beginningto see historical logs immediately.
Configure ClickStack to load custom configuration
To enable custom collector configuration in your existing ClickStack deployment, you must:
- Mount the custom config file at
/etc/otelcol-contrib/custom.config.yaml - Set the environment variable
CUSTOM_OTELCOL_CONFIG_FILE=/etc/otelcol-contrib/custom.config.yaml - Mount your syslog directory so the collector can read them
Option 1: Docker Compose
Update your ClickStack deployment configuration:
Option 2: Docker Run (All-in-One Image)
If you're using the all-in-one image with docker run:
Ensure the ClickStack collector has appropriate permissions to read the syslog files. In production, use read-only mounts (:ro) and follow the principle of least privilege.
Verifying Logs in HyperDX
Once configured, log into HyperDX and verify logs are flowing:
- Navigate to the search view
- Set source to Logs
- Filter by
source:host-logsto see host-specific logs - You should see structured log entries with fields like
unit,hostname,pid,message, etc.
Demo dataset
For users who want to test the host logs integration before configuring their production systems, we provide a sample dataset of pre-generated system logs with realistic patterns.
Download the sample dataset
Download the sample log file:
The dataset includes:
- System boot sequence
- SSH login activity (successful and failed attempts)
- Security incident (brute force attack with fail2ban response)
- Scheduled maintenance (cron jobs, anacron)
- Service restarts (rsyslog)
- Kernel messages and firewall activity
- Mix of normal operations and notable events
Create test collector configuration
Create a file named host-logs-demo.yaml with the following configuration:
Run ClickStack with demo configuration
Run ClickStack with the demo logs and configuration:
This mounts the log file directly into the container. This is done for testing purposes with static demo data.
Verify logs in HyperDX
Once ClickStack is running:
- Open HyperDX and log in to your account (you may need to create an account first)
- Navigate to the Search view and set the source to
Logs - Set the time range to 2025-11-10 00:00:00 - 2025-11-13 00:00:00
HyperDX displays timestamps in your browser's local timezone. The demo data spans 2025-11-11 00:00:00 - 2025-11-12 00:00:00 (UTC). The wide time range ensures you'll see the demo logs regardless of your location. Once you see the logs, you can narrow the range to a 24-hour period for clearer visualizations.
Dashboards and visualization
To help you get started monitoring host logs with ClickStack, we provide essential visualizations for system logs.
Import the pre-built dashboard
- Open HyperDX and navigate to the Dashboards section
- Click Import Dashboard in the upper right corner under the ellipses
- Upload the
host-logs-dashboard.jsonfile and click Finish Import
View the dashboard
The dashboard will be created with all visualizations pre-configured:
Key visualizations include:
- Log volume over time by severity
- Top systemd units generating logs
- SSH login activity (successful vs failed)
- Firewall activity (blocked vs allowed)
- Security events (failed logins, bans, blocks)
- Service restart activity
For the demo dataset, set the time range to 2025-11-11 00:00:00 - 2025-11-12 00:00:00 (UTC) (adjust based on your local timezone). The imported dashboard will not have a time range specified by default.
Troubleshooting
Custom config not loading
Verify the environment variable is set:
Check the custom config file is mounted and readable:
No logs appearing in HyperDX
Verify syslog files exist and are being written:
Check the collector can read the logs:
Check the effective config includes your filelog receiver:
Check for errors in the collector logs:
If using the demo dataset, verify the log file is accessible:
Logs not parsing correctly
Verify your syslog format matches the configuration you chose:
For Modern Linux (Ubuntu 24.04+):
For Legacy Linux or macOS:
If your format doesn't match, select the appropriate configuration tab in the Create custom OTel collector configuration section.
Next steps
After setting up host logs monitoring:
- Set up alerts for critical system events (service failures, authentication failures, disk warnings)
- Filter by specific units to monitor particular services
- Correlate host logs with application logs for comprehensive troubleshooting
- Create custom dashboards for security monitoring (SSH attempts, sudo usage, firewall blocks)
Going to production
This guide extends ClickStack's built-in OpenTelemetry Collector for quick setup. For production deployments, we recommend running your own OTel Collector and sending data to ClickStack's OTLP endpoint. See Sending OpenTelemetry data for production configuration.