Use a custom script in nagios to monitor DataMate3000 precision air conditioning temperature and other statuses
First, let's briefly introduce an environment where one nagios warning server and one precision air conditioner DataMata3000 (old models, comes with a single-host management software that does not support email and SMS alarm functions, and can only view status, etc, however, a simple HTTP status page is provided for viewing, and a network interface device that supports querying the SNMP protocol is also available. If you need to meet the requirements, purchase dedicated cluster environment management software)
Since the SNMP protocol is supported, it is easy to do. As we all know, nagios supports Custom Script Commands and can be determined by exit of the script and return the status code. The script is written in python and mainly uses the netsnmp module. The specific code is shown in the attachment. In addition, nagios's custom command configuration is also too easy to say. There are a lot of online information, you can also refer to the following reference articles. I personally think that if I can get the MIB library of the vendor's device, it would be much easier to write a script to obtain the corresponding information based on the vendor's custom MIB library information. If I do not, then you can only use snmpwalk to get the device OID and then slowly match the corresponding, it is really dead. The attachment contains a mib of the DME3000 device.
DataMate3000check.zipDME3000_COND.zip
References:
Http://blog.chinaunix.net/uid-26978448-id-3389951.html
Http://blog.chinaunix.net/uid-26978448-id-3385856.html
Http://zhangxz.blog.51cto.com/5490116/1321862