Dear Expert
We fetching APC load/power values .1.3.6.1.4.1.318.1.1.12.2.3.1.1.2.3 via $USER1$/check_snmp
but the raw values need to divide/multiply. How to do that?
the return value is 49 however in real its 4.9 A, in this case how to divide that raw value?
Regards
check_snmp value need to multiply/divide
check_snmp value need to multiply/divide
Zajil NMS
Re: check_snmp value need to multiply/divide
It depends upon what you want to do with it. I'm not sure that Nagios XI allows for integrated "post-processing" of performance data (which is technically what this is).
One way to handle this would be to use an event handler to perform the calculation and then have it pass that back for further processing.
Another, more difficult, way to do this would be to craft a custom SNMP OID on the monitored host, assuming the host uses a general purpose operating system like Linux and it supports a standard SNMP architecture like Net-SNMP. If it does, go to the Net-SNMP web site and look at the "exec" function. Basically, in the snmpd.conf file you insert an entry that defines a custom OID and a command to run when it is polled. This command would execute a script that would perform a local snmpget, then execute your calculation, then pass the result back to the polling client as the result of the client's SNMP poll (e.g. snmpget).
Here's a link to get you started: http://www.net-snmp.org/wiki/index.php/FAQ:Agent_07
Here's an example of an "exec" entry in snmpd.conf. Please note that the use of "exec" has been deprecated, but new syntax follows the same basic concept.
One way to handle this would be to use an event handler to perform the calculation and then have it pass that back for further processing.
Another, more difficult, way to do this would be to craft a custom SNMP OID on the monitored host, assuming the host uses a general purpose operating system like Linux and it supports a standard SNMP architecture like Net-SNMP. If it does, go to the Net-SNMP web site and look at the "exec" function. Basically, in the snmpd.conf file you insert an entry that defines a custom OID and a command to run when it is polled. This command would execute a script that would perform a local snmpget, then execute your calculation, then pass the result back to the polling client as the result of the client's SNMP poll (e.g. snmpget).
Here's a link to get you started: http://www.net-snmp.org/wiki/index.php/FAQ:Agent_07
Here's an example of an "exec" entry in snmpd.conf. Please note that the use of "exec" has been deprecated, but new syntax follows the same basic concept.
Code: Select all
exec .1.3.6.1.4.1.2021.300.1.8.1 MYSYSTEM_CHECK_VALUE /usr/local/nagios/libexec/check_mysystem.ksh 4Re: check_snmp value need to multiply/divide
Former Nagios Employee.
me.
me.