zabbix- Custom Monitor

Node1 custom database status monitoring, and set the alarm

Edit agent client userparameter_mysql.conf file, the last line to add custom content monitoring

[root@node1 ~]# cd /etc/zabbix/zabbix_agentd.d/
[root@node1 zabbix_agentd.d]# ls
userparameter_mysql.conf
[root@node1 zabbix_agentd.d]# vim userparameter_mysql.conf 
# Add in the bottom of the file: UserParameter = key, command
UserParameter=mysql.check,systemctl status mariadb.service | grep -c running

Add Monitoring item in the web

 

 Named to the monitoring item and enter the key for the mysql.check was defined, and writes a custom set of applications

 

After successfully added to see whether the latest data acquisition to data

 

Create a new item to add monitoring graph (graphic)

Monitoring items related to graphics

Check whether to add graphics success

Create a database trigger alarm

 

 Add an expression triggers alarm

Associated monitoring item, and the result is set to 0 | Trigger (systemctl status mariadb.service grep -c running command when the database is unavailable, statistical keyword running 0)

 

The data stopped, check whether the alarm Success

 

Guess you like

Origin www.cnblogs.com/cloudhere/p/11032226.html
Recommended