zabbix mysql模板_zabbix模板监控mysql
將模板添加給主機(jī)后
需要如下配置:
1,數(shù)據(jù)庫(kù)授權(quán)獲取數(shù)據(jù)的用戶
grant select on . to zabbixmonitor@"localhost" identified by "zabbixmonitor";
flush privileges;
2,配置文件
vim /etc/zabbix/.my.cnf
[client]
hostname = localhost
user = zabbixmonitor
password = zabbixmonitor
3,/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
a,由于這里寫(xiě)的mysql的命令是相對(duì)路徑,如果閣下是編譯安裝,請(qǐng)寫(xiě)絕對(duì)路徑
which mysql -------------------- 如若不然會(huì)報(bào)command not found
b,更改配置文件的家目錄為:/etc/zabbix
sed -i 's#/var/lib/zabbix#/etc/zabbix#g' /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
4,重啟客戶端
systemctl restart zabbix-agent
總結(jié)
以上是生活随笔為你收集整理的zabbix mysql模板_zabbix模板监控mysql的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: pythonset操作教程_Python
- 下一篇: mysql數據庫的增刪改查_MySQL數