Page 1 of 1

check_snmp - Cannot create temporary filename

Posted: Tue Nov 29, 2011 8:44 pm
by Box293
Recently I upgraded to nagios-plugins 1.4.15 on my test box. I wanted to do this so I could try out the new options for check_snmp --rate and --rate-multiplier.

When I execute the command from the CLI (as root) it seems to work as expected:

Code: Select all

[root@VAULT23 libexec]# ./check_snmp -H 192.168.105.2 -o .1.3.6.1.4.1.8741.1.3.1.3.0 -C public -P 2c -l "" -u % --rate --rate-multiplier=60
SNMP RATE OK -  120082962.6 % | =120082962.6
When I add a service that executes the same command I get an Unknown status with Cannot create temporary filename.

If I create an identical check without the --rate --rate-multiplier=60 arguments the command works fine.

Re: check_snmp - Cannot create temporary filename

Posted: Wed Nov 30, 2011 3:41 pm
by mguthrie
It's probably a permissions issue. What happens if you run:

Code: Select all

chmod u+s check_snmp
This will make it so that this plugin always runs as root

Re: check_snmp - Cannot create temporary filename

Posted: Wed Nov 30, 2011 6:04 pm
by Box293
Bingo, that fixed the problem :D

Much appreciated

Re: check_snmp - Cannot create temporary filename

Posted: Thu Dec 01, 2011 10:24 am
by mguthrie
You bet!