How to Monitor MySQL/MariaDB through Prometheus & Grafana ?

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

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 🙏
@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 2 жыл бұрын
may I know what kind of app you use to command?
@Jpes211
@Jpes211 26 күн бұрын
prome~te~theus
@avinashkumar-thelearningdest
@avinashkumar-thelearningdest 26 күн бұрын
😀
How to Monitor PostgreSQL with Prometheus & Grafana ? #prometheus #grafana #postgresql #database
15:57
Avinashkumar - The Learning Destination
Рет қаралды 16 М.
MySQL monitoring using Prometheus and Grafana | MySQL Exporter
18:49
CodeWithRajRanjan
Рет қаралды 700
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
00:24
JULI_PROETO
Рет қаралды 14 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 37 МЛН
ТАМАЕВ УНИЧТОЖИЛ CLS ВЕНГАЛБИ! Конфликт с Ахмедом?!
25:37
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 7 МЛН
Server Monitoring // Prometheus and Grafana Tutorial
24:36
Christian Lempa
Рет қаралды 620 М.
Free MySQL Monitoring With Zabbix Monitoring Software
15:31
Dmitry Lambert
Рет қаралды 25 М.
Server Monitoring with Grafana Prometheus and Loki
51:44
Piyush Garg
Рет қаралды 43 М.
How Prometheus Monitoring works | Prometheus Architecture explained
21:31
TechWorld with Nana
Рет қаралды 1 МЛН
Relabeling in Prometheus | Relabeling Architecture and Flow, Configuration, Examples, Debugging
10:52
Prometheus Monitoring with Julius | PromLabs
Рет қаралды 6 М.
🔥 Server Monitoring with Prometheus and Grafana Tutorial
25:27
SkillsBuild Training
Рет қаралды 12 М.
How to install Prometheus Server on Centos Linux and Integrate it with Grafana Server #prometheus
17:17
Avinashkumar - The Learning Destination
Рет қаралды 7 М.
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
00:24
JULI_PROETO
Рет қаралды 14 МЛН