OpenTelemetry
A guide on how to collect logs using OpenTelemetry on Linux from installation to ingestion
Last updated
Was this helpful?
A guide on how to collect logs using OpenTelemetry on Linux from installation to ingestion
Last updated
Was this helpful?
For DEB-based:
For RHEL-based:
Edit /etc/otelcol-contrib/config.yaml
and replace the content with the below
Replace the following values:
<your_log_file_path>
Physical path to your log file
<your_domain>
Hostname of your Apica environment (example.apica.io)
<your_token>
<namespace>
A name for high-level grouping of logs, isolating different projects, environments, or teams.
<application>
A name for logs generated by a specific service or process
line_start_pattern
The above example uses a regex to match on the timestamp of a log entry to capture the entire entry. This needs to be adjusted to match the beginning of your log structure. See below example of entries that matches this pattern.
When you're done with your edits, execute the below command to validate the config is valid (it should return nothing if everything is in order)
Restart OTel to apply your changes
Assuming everything has been done correctly, your logs will start to appear in Explore > Logs & Insight on your Ascent environment. They will show up based on the namespace and application names that you set in your config.yaml file.
Your ingest token, see