extend--custom monitoring of SNMP under Linux

Source: Internet
Author: User
Tags snmp snmp query

In addition to having system-default monitoring items, SNMP provides a powerful feature to customize monitoring items.


The EXEC option in the snmpd.conf configuration file (in the higher version of SNMP, extend instead of exec) provides a custom monitoring feature that can add commands or script execution results to SNMP queries.


The format is:

extend oid   identifier   command or script
Extend .1.3.6.1.4.1.2021.45 Dhcp1 /home/scripts/dhcp.sh Alive_status


Explain:

Extend Extended feature options available with snmpd.conf
Oid

This OID is custom, usually using the idle oid (. 1.3.6.1.4.1.2021.xx), or it can overwrite the OID already defined

Identifier Identifiers to differentiate between different extension items
command or Script The execution result of the command or script, added to the SNMP query (similar to the given, var=123)
Key value Custom key value, the key value to be filled in when adding SNMP monitoring entries in Zabbix is this


After customizing in snmpd.conf, restart the SNMP service for it to take effect.


You can obtain the results of the SNMP query for the custom extension by using the following command query on another server, proving that it is valid:


650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9A/C1/wKioL1laF_DTUQt1AACu3wxveA0102.png "title=" Pictures _ 20170703175918.png "style=" float:left;width:720px;height:188px; "width=" 720 "height=" 188 "border=" 0 "hspace=" 0 " Vspace= "0" alt= "wkiol1laf_dtuqt1aacu3wxvea0102.png"/>









This article is from the "12400094" blog, please be sure to keep this source http://12410094.blog.51cto.com/12400094/1944160

extend--custom monitoring of SNMP under Linux

Related Article

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.