Ubuntu
This document describes a sample setup for sending logs to Last9 via OpenTelemetry collector from Ubuntu instance
Installing OpenTelenetry collector on Ubuntu instance
Use Last9’s OpenTelemetry endpoint to ingest logs from Ubuntu instances using Otel Collector.
Prerequisites:
There are multiple ways to install the Otel Collector. One possible way is to use the package. Every Collector release includes APK, DEB, and RPM packaging for Linux amd64/arm64/i386 systems.
More installation options can be found here.
Sample Otel collector Configuration:
The default path for otel config is /etc/otelcol-contrib/config.yaml
.
You can edit it and update it using the configuration below. The configuration for operators is essential to extract the timestamp and severity.
For JSON logs, you can use json_parser
and use its keys for log attributes. For non-structured logs, use the regex_parser
.
The configuration provides a sample example of a JSON parser.
Run the otel collector using systemctl
command
Checking logs of otel collector
This will enable logs from the Ubuntu machine to be sent to Last9. To see the data in action, visit the Logs Dashboard.
Verification
Login to Last9 and visit the Logs panel.
Troubleshooting
Please get in touch with us on Discord here or Email if you have any questions.