Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I would like to know if exists some option for check_snmp plugin in order to convert the STRING return value to float/decimal value.
Below an example with the check_snmp v1.4.15 belonging to the nagios-plugins 1.4.15 pkg.
Well technically speaking any output that comes from a Nagios plugin is going to be a string. What is your use case here? If you are looking to modify the plugin source code you can find it here: https://github.com/nagios-plugins/nagio ... eck_snmp.c
Otherwise it could be pretty trivial to write a wrapper script in Python or something to parse that string into an integer.
thank you for your feedback.
I am tring to explain better my case.
If I ask to a dated device the result of a parameter (via the nagios plugin check_snmp) I get a STRING
When you run the snmpget command, the output(STRING or INTEGER) is telling you that the OID you are polling is a String or an Integer but of you want to change the output of the plugin to a different value, you would have to write a wrapper.
Be sure to check out our Knowledgebase for helpful articles and solutions!