How to Monitor MySQL/MariaDB through Prometheus & Grafana ?

  Рет қаралды 8,622

Avinashkumar - The Learning Destination

Avinashkumar - The Learning Destination

2 жыл бұрын

Please follow the below steps to install mysqld_exporter.
curl -s api.github.com/repos/promethe... | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -qi -
tar xvf mysqld_exporter*.tar.gz
sudo mv mysqld_exporter-*.linux-amd64/mysqld_exporter /usr/local/bin/
sudo chmod +x /usr/local/bin/mysqld_exporter
CREATE USER mysqld_exporter IDENTIFIED BY 'PASSWD';
GRANT PROCESS, REPLICATION CLIENT, SELECT ON . TO 'mysqld_exporter';
FLUSH PRIVILEGES;
EXIT
Configure DB Credential
sudo vi /etc/.mysqld_exporter.cnf
[client]
user=mysqld_exporter
password=PASSWD
host=192.168.56.109
Change ownership
sudo chown root:prometheus /etc/.mysqld_exporter.cnf
Create Systemd File
sudo vi /etc/systemd/system/mysql_exporter.service
[Unit]
Description=Prometheus MySQL Exporter
After=network.target
User=prometheus
Group=prometheus
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/mysqld_exporter \
--config.my-cnf /etc/.mysqld_exporter.cnf \
--collect.global_status \
--collect.info_schema.innodb_metrics \
--collect.auto_increment.columns \
--collect.info_schema.processlist \
--collect.binlog_size \
--collect.info_schema.tablestats \
--collect.global_variables \
--collect.info_schema.query_response_time \
--collect.info_schema.userstats \
--collect.info_schema.tables \
--collect.perf_schema.tablelocks \
--collect.perf_schema.file_events \
--collect.perf_schema.eventswaits \
--collect.perf_schema.indexiowaits \
--collect.perf_schema.tableiowaits \
--collect.slave_status \
--web.listen-address=0.0.0.0:9104
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable mysql_exporter
sudo systemctl start mysql_exporter
Import Mysql Grafana Dashboard
grafana.com/grafana/dashboard...

Пікірлер: 11
@hazlanmuhammadqodri8469
@hazlanmuhammadqodri8469 10 ай бұрын
Your explanation is so awesome and great sir! Thank you for the tutorial, it helped me a lot!
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 10 ай бұрын
Thank you so much Brother for your kind words. Please share my channel within your network.
@arielhumbertocorralessardi589
@arielhumbertocorralessardi589 2 жыл бұрын
it's a good video, very precise and explicative
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 2 жыл бұрын
Thank you so much Ariel for your encouraging comments. Please help me to share my channel within your friends. As despite of good contents, I have very few subscribers.
@rohitsaraf-qz9ue
@rohitsaraf-qz9ue Жыл бұрын
sir you are greatly explained everything ............................. thank you
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest Жыл бұрын
Thank you so much brother 🙏
@Jpes211
@Jpes211 12 күн бұрын
prome~te~theus
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 12 күн бұрын
😀
@desishofianasari8032
@desishofianasari8032 Жыл бұрын
hello I wanna ask, maybe there's people can help me. So I have 2 vm for monitoring and target. I install apache in monitor-vm, and install prometheus in target-vm. So, I install mysql_exporter in monitor and configured it on prometheus. But when I starting to enter localhost:9104, I can't access it. What should I use for the host, is IP Adress from Monitor-vm or Target-vm?
@ulfahfarhana178
@ulfahfarhana178 Жыл бұрын
may I know what kind of app you use to command?
How to Monitor PostgreSQL with Prometheus & Grafana ? #prometheus #grafana #postgresql #database
15:57
Avinashkumar - The Learning Destination
Рет қаралды 15 М.
Server Monitoring with Grafana Prometheus and Loki
51:44
Piyush Garg
Рет қаралды 40 М.
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 11 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 8 МЛН
MySQL monitoring using Prometheus and Grafana | MySQL Exporter
18:49
CodeWithRajRanjan
Рет қаралды 542
Learn MongoDB Health Checks/Monitoring with Prometheus & Grafana #prometheus #grafana #mongodb
12:15
Avinashkumar - The Learning Destination
Рет қаралды 8 М.
Install Prometheus MySQL exporter using Docker Compose | Prometheus
10:33
Server Monitoring // Prometheus and Grafana Tutorial
24:36
Christian Lempa
Рет қаралды 614 М.
Relabeling in Prometheus | Relabeling Architecture and Flow, Configuration, Examples, Debugging
10:52
Prometheus Monitoring with Julius | PromLabs
Рет қаралды 6 М.
How To Install Prometheus And Grafana On Docker
22:24
Tech Tutorials - David McKone
Рет қаралды 14 М.