Last active
January 15, 2024 13:18
-
-
Save arsalanses/d0452a132fe65095c104f55459b933c7 to your computer and use it in GitHub Desktop.
MySQL Exporter Quickstart and Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [client] | |
| user=username | |
| password=password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| mysqld-exporter: | |
| image: prom/mysqld-exporter:latest | |
| container_name: mysqld-exporter | |
| environment: | |
| - MYSQLD_EXPORTER_PASSWORD=password | |
| - DATA_SOURCE_NAME="user:password@(db:3306)/database" | |
| command: | |
| - --mysqld.address=database:3306 | |
| - --mysqld.username=username | |
| - --web.config.file=/cfg/webconfig.yml | |
| # - --config.my-cnf=/cfg/.my.cnf | |
| volumes: | |
| - ./webconfig.yml:/cfg/webconfig.yml | |
| # - ./config.my-cnf:/cfg/.my.cnf | |
| ports: | |
| - 9104:9104 | |
| links: | |
| - db | |
| depends_on: | |
| - db | |
| # https://grafana.com/grafana/dashboards/14057-mysql/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # echo 1234 | htpasswd -inBC 10 "" | tr -d ':\n' | |
| basic_auth_users: | |
| admin: $2y$10$DflJBSLBlS2z3d9rk6pdk.EadVxBVlXc084wPgCqoaW2T1KblOjyi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment