Page 1 of 1

Problem with snmp check

Posted: Thu Jan 13, 2011 12:18 pm
by poliver21
Hello,

I encounter another problem with a switch.
I did setup this :

Code: Select all

define service {
        host_name       sw-00-00
        service_description     BP Trk1
        check_command   check_bw!"Trk1"!2000000000
        use     snmp-port-bw,srv-pnp
}
define service {
        host_name       sw-00-00
        service_description     BP Trk2
        check_command   check_bw!"Trk2"!2000000000
        use     snmp-port-bw,srv-pnp
}
define service {
        host_name       sw-00-00
        service_description     BP Port 24
        check_command   check_bw!24!1000000000
        use     snmp-port-bw,srv-pnp
}
Only the service "BP Trk2" works. The others "work in CLI", but on nagios web interface, I get a :
BP Trk1
CRITICAL 01-13-2011 18:17:23 0d 7h 10m 5s 10/10 (Return code of 13 is out of bounds)

Any idea ?

Regards.

[Solved] Re: Problem with snmp check

Posted: Thu Jan 13, 2011 12:31 pm
by poliver21
Hi,

I answer myself.
I just read a post that I didn't find before, which gave me the solution :
Your check_iftraffic plugin works fine from commandline, but fails if nagios runs the check.
Surely you ran the plugin in commandline before defining a serviceobject. If you do so, a tmp file is created in /tmp/check_ifx_ip with owner root. Of course nagios can’t update this file because of bad ownerships.

Solution: Delete the /tmp/check_ifX_IP file and Nagios will check normally.


Is worked for me.

Hope this may help on of you.

Regards

Re: Problem with snmp check

Posted: Wed Feb 01, 2012 2:14 am
by andaks
Could you please assist me with check_iftraffic.
Everything is ok when it started in console, but from the web it doesnt want to draw graphs. It shows blank graphs.