1. Script to write the monitoring service
[email protected] ~]# cat mysqlstat.sh
#!/bin/bash
mysqlstat= ' ps aux | grep MySQL | Wc-l '
Echo $mysqlstat
[Email protected] ~]#./mysqlstat.sh
3
[Email protected] ~]# snmpwalk-v 2c-c public localhost. 1.3.6.1.2.1.1.9.1.4.100
snmpv2-mib::sysoruptime.100 = No Such Instance currently exists at the This OID
[Email protected] ~]# vim/etc/snmp/snmpd.conf
extend. 1.3.6.1.2.1.1.9.1.4.100 mysqlstat/root/mysqlstat.sh #添加一行
[Email protected] ~]#/etc/init.d/snmpd restart
stopping snmpd: [OK]
Starting snmpd: [OK]
[Email protected] ~]# snmpwalk-v 2c-c public localhost-on. 1.3.6.1.2.1.1.9.1.4.100
.1.3.6.1.2.1.1.9.1.4.100.1.0 = Wrong Type (should be timeticks): integer:1
.1.3.6.1.2.1.1.9.1.4.100.2.1.2.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): STRING: "/root /mysqlstat.sh "
.1.3.6.1.2.1.1.9.1.4.100.2.1.3.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): ""
.1.3.6.1.2.1.1.9.1.4.100.2.1.4.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): ""
.1.3.6.1.2.1.1.9.1.4.100.2.1.5.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): Integer:5
.1.3.6.1.2.1.1.9.1.4.100.2.1.6.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): integer:1
.1.3.6.1.2.1.1.9.1.4.100.2.1.7.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): integer:1
.1.3.6.1.2.1.1.9.1.4.100.2.1.20.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): Integer:4
.1.3.6.1.2.1.1.9.1.4.100.2.1.21.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): integer:1
.1.3.6.1.2.1.1.9.1.4.100.3.1.1.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): STRING: "5"
.1.3.6.1.2.1.1.9.1.4.100.3.1.2.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): STRING: "5"
.1.3.6.1.2.1.1.9.1.4.100.3.1.3.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): integer:1
.1.3.6.1.2.1.1.9.1.4.100.3.1.4.9.109.121.115.113.108.115.116.97.116 = Wrong Type (should be timeticks): integer:0
. 1.3.6.1.2.1.1.9.1.4.100.4.1.2.9.109.121.115.113.108.115.116.97.116.1= Wrong Type (should be timeticks): STRING: "5"
[Email protected] ~]#
2. Add categories, projects and triggers to Zabbix
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7F/6F/wKioL1ce4j6yVwD8AABtSmbEiXI148.png "title=" 10.png "alt=" Wkiol1ce4j6yvwd8aabtsmbeixi148.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/71/wKiom1ce4gvA9LGPAAA81rafOrY217.png "style=" float: none; "title=" 11.png "alt=" Wkiom1ce4gva9lgpaaa81rafory217.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7F/6F/wKioL1ce4tWjadDkAABcw2Tb0L4882.png "style=" float: none; "title=" 13.png "alt=" Wkiol1ce4twjaddkaabcw2tb0l4882.png "/>
3. View Graphics
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7F/71/wKiom1ce4m2wY-hMAAA2bpQTMMY821.png "title=" 12.png "alt=" Wkiom1ce4m2wy-hmaaa2bpqtmmy821.png "/>
This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1767804
Monitoring Zabbix Custom OID