标签:dir 导入 cat ESS mysq cli ica info class
方案1: 使用官方 推荐的方案 https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mysql
方案2: 自己写脚本
问题: 官方在 Zabbix 4.2.1
上测试通过,而我安装的zabbix 4.2.6
版本的. 在配置mysql用户信息时出问题了.
我直接创建一个zabbix 本地登录不要密码的用户解决的.
wget https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/templates/db/mysql/template_db_mysql.conf?at=refs%2Fheads%2Fmaster -O /etc/zabbix/zabbix_agentd.d/template_db_mysql.conf
CREATE USER ‘zbx_monitor‘@‘%‘ IDENTIFIED BY ‘密码‘; GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO ‘zbx_monitor‘@‘%‘;
create user 'zabbix'@'localhost';
GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zabbix'@'localhost';
flush privileges;
.my.cnf
in home directory of Zabbix agent for Linux (/var/lib/zabbix
by default ) or my.cnf
in c:?for Windows. The file must have three strings:[client]
user=zbx_monitor
password=设置的密码
https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/templates/db/mysql/template_db_mysql.xml?at=refs%2Fheads%2Fmaster
在zabbix-server的web上导入即可.
操作路径是配置->模板->导入
选择上面下载的模板文件导入.
导入成功后
路径 配置->主机->新建
方案2:请参考下面网页
http://www.sunrisenan.com/docs/zabbix/zabbix-1ari17qg766mj
https://blog.51cto.com/chaixinwang/2057488
https://www.zabbix.com/documentation/3.4/zh/manual/concepts/get
标签:dir 导入 cat ESS mysq cli ica info class
原文地址:https://www.cnblogs.com/lovesKey/p/11431585.html