github.com/observiq/bindplane-agent@v1.51.0/config/prometheus/mysql/README.md (about) 1 # MySQL Metrics with Prometheus 2 3 The MySQL Receiver can be used to send MySQL metrics to Prometheus. 4 5 ## Limitations 6 7 The agent must be installed on the Mysql system. 8 9 ## Prerequisites 10 11 See the [prerequisites](../README.md) doc for Prometheus prerequisites. 12 13 ## Authentication Environment Variables 14 15 The configuration assumes the following environment variables are set: 16 - `MYSQL_USERNAME` 17 - `MYSQL_PASSWORD` 18 19 Set the variables by creating a [systemd override](https://wiki.archlinux.org/title/systemd#Replacement_unit_files). 20 21 Run the following command 22 ```bash 23 sudo systemctl edit observiq-otel-collector 24 ``` 25 26 If this is the first time an override is being created, the file will be empty. Paste the following contents into the file. If the `Service` section is already present, append the two `Environment` lines to the `Service` section. 27 28 Replace `otel` with your Mysql username and password. 29 ``` 30 [Service] 31 Environment=MYSQL_USERNAME=otel 32 Environment=MYSQL_PASSWORD=otel 33 ``` 34 35 After restarting the agent, the configuration will attempt to use the username:password `otel:otel`. 36 37 ```bash 38 sudo systemctl restart observiq-otel-collector 39 ```