SNMP Plugin Output Not Written in InfluxDB When Output is Double Quoted

(Jmora2) #1

Hello Team,

I need a bit of help here, I am almost positive this issue has come up already, but I cannot find any information about it.

Basically, I have two checks. One comes back with an output like this:

The second output comes back like this:
SNMP OK - “747564”

The second is a string and it needs to be stored in influxdb as numeral, i checked the documentation, but I am almost clueless here. Could anybody please help me.


(Jmora2) #2

Hi Team,

I was able to do a wrapper script to remove the quotes and get only the numerical values, but whats left is still not being written to influxdb. Any further help will be appreciated.


(Alex) #3


how does the plugin output look like when you execute it over the command line?


(Roland Sommer) #4

Performance data needs to be in format as described here.

(Jmora2) #5


This is what comes back:

/usr/lib/nagios/plugins/./check_snmp -L authPriv -U pdSNMP -a SHA -A “1234” -x AES -X “1234” -P 3 -H -o

SNMP OK - “746488” |

This second output has the wrapper, basically it does what is after the “|”, in the original cli command, it executes the wrapper then calls check_snmp, something like this:

/usr/lib/nagios/plugins/./check_snmp -L authPriv -U pdSNMP -a SHA -A “xa4vah4eij2Aikaey0ai” -x AES -X “chai9aesheiPeipago0e” -P 3 -H -o | sed ‘s/"//g’

SNMP OK - 746488 |

the script looks like this:


eval "/usr/lib/nagios/plugins/check_snmp  -H '$address' -o '$oid' -L '$seclevel' -U '$user' -a '$authproto' -A '$authpasswd' -x '$privproto' -X '$privpasswd' -P '$snmpversion' | sed 's/\"//g'"

I hope this makes sense.



Please run an snmpget for these two OIDs and show the results. Please note that there is no performance data for type “STRING” so you might have to “create” your own.

(Jmora2) #7


here is the output:

snmpget -v 2c -c 1234

iso. = STRING: “744940”

PS1: snmpv3 comes back with the same result.
PS2: I have another icinga2 in other location and the data is being stored even without the wrapper.



Please take a look at the performance data of the other check and show the snmpget result of the other location.

(Jmora2) #9


I dont really know about the performance data, but both Icinga2s are configured the same way, even che checks are the same; I also checked the snmpget and I got the following results:

snmpget -v 2c -c 1234

iso. = STRING: “715616”


Influx is a separate component. It relies on the data delivered by the monitoring process. Please check your Influx configuration which information is used to populate the Influx-DB.

(Jmora2) #11

In the config file, influxdb.conf everything is commented out (#) that means i should be using the default config [InfluxDB shell version: 1.7.8]. I still think the issue is not influx, the other icinga2 generates the data properly, if I see the plugin output in the webclient, i see that everything is being written without the quote marks. The snmpget/walk returns with and without quotes, depending on the OID, but I see it in the webclient without quotes.

I still think that the data is sent to the database improperly, but i have no way to proof this, because I am using the exact same configuration in all VMs.

(Jmora2) #12

This is what I mean, first screenshot has what i need:


The second one, has the exact same config, but it is displayed/written differently:


In the second screenshot you can see the quotes " "