Monitor Zabbix User-Defined OID

Source: Internet
Author: User
Tags snmpwalk

Monitor Zabbix User-Defined OID

Monitor Zabbix User-Defined OID

1. Write the Monitoring Service script

[Root @ db02 ~] # Cat mysqlstat. sh
#! /Bin/bash

Mysqlstat = 'ps aux | grep mysql | wc-l'
Echo $ mysqlstat
[Root @ db02 ~] #./Mysqlstat. sh
3

[Root @ db02 ~] # 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 this OID
[Root @ db02 ~] # Vim/etc/snmp/snmpd. conf
Extend. 1.3.6.1.2.1.1.9.1.4.100 mysqlstat/root/mysqlstat. sh # Add a row

[Root @ db02 ~] #/Etc/init. d/snmpd restart
Stopping snmpd: [OK]
Starting snmpd: [OK]
[Root @ db02 ~] # 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould 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 (shocould be Timeticks): STRING: "5"
[Root @ db02 ~] #

 

2. Add categories, projects, and triggers in zabbix

3. view images

Some Zabbix Tutorials:

Compile and install Zabbix2.4.5 source code in Ubuntu 14.04

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy Zabbix in CentOS 6.3

Zabbix distributed monitoring system practice

Under CentOS 6.3, Zabbix monitors apache server-status

Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3

Install Zabbix 2.0.6 in 64-bit CentOS 6.2

ZABBIX details: click here
ZABBIX: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.