2021-08-06 監(jiān)控MySQL服務(wù)器

mysql_exporter:用于收集MySQL性能信息。默認(rèn)監(jiān)聽端口:9104
項(xiàng)目地址:https://github.com/prometheus/mysqld_exporter
監(jiān)控服務(wù)器下載Linux版mysql_exporter
部署配置監(jiān)控MySQL服務(wù)器

tar zxf mysqld_exporter-0.13.0.linux-amd64.tar.gz
mv mysqld_exporter /usr/local/mysqld_exporter
cd /usr/local/mysqld_exporter
vi conf/test.cnf    ---配置被監(jiān)控MySQL的信息
[client]
user=root
password=123456
port=3306
host=192.168.1.99

nohup ./mysqld_exporter --config.my-cnf="conf/test.cnf" --web.listen-address=":9104" &    ---啟動(dòng)mysqld_exporter

配置監(jiān)控MySQL主機(jī)

cd /usr/local/prometheus
vi prometheus.yml
scrape_configs:
  - job_name: '數(shù)據(jù)庫'
    static_configs:
    - targets: ['localhost:9104']    ---因?yàn)閿?shù)據(jù)庫信息通過本地的9104端口采集

Grafana導(dǎo)入儀表盤

導(dǎo)入儀表盤
導(dǎo)入儀表盤
導(dǎo)入7362儀表盤
導(dǎo)入儀表盤
正常監(jiān)控
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容