MariaDB
This document describes a sample setup for sending MariaDB logs and metrics to Last9 via OpenTelemetry collector
This document lists step-by-step instructions for setting up MariaDB/MySQL monitoring using mysqld_exporter
and OpenTelemetry Collector with Last9.
It collects host metrics, MySQL metrics, and MySQL logs and sends them to Last9.
Prerequisites
- Create a Last9 account by following Getting Started guide.
- Keep the following information handy after creating the account from the Integrations page:
$last9_otlp_endpoint
: Last9 OpenTelemetry endpoint$last9_basic_auth_header
: OpenTelemetry Basic authorization header
Supported versions:
- MySQL >= 5.6.
- MariaDB >= 10.3
Installation
If you don’t have a MariaDB instance, you can follow the steps below to set it up. If you already have a MariaDB instance, you can skip this step.
1. MariaDB Setup
Configure MariaDB:
Add configuration:
2. Create Monitoring User
3. Install mysqld_exporter
Configure exporter:
Create service:
This step ensures the mysqld_exporter
is running and emitting metrics from MariaDB on port 9104.
4. Install OpenTelemetry Collector
Configure collector:
Copy the configuration from here and update in /etc/otelcol-contrib/config.yaml
. Make sure to update the OpenTelemetry endpoint to $last9_otlp_endpoint
and authorization header to $last9_basic_auth_header
.
Start collector:
Verification
- Check MariaDB:
- Verify configuration:
- Test exporter:
Troubleshooting
- MariaDB issues:
- Exporter issues:
- Collector issues:
Verification
Visit Last9 to see the MariaDB metrics and logs.
Troubleshooting
Please get in touch with us on Discord or Email if you have any questions.