check_snmp problem

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.
Locked
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

check_snmp problem

Post by sartecat »

So I have this configuration for my Palo Alto 2050

define host{
use generic-switch
host_name paloalto
parents testSw2
alias Palo Alto 2050 Firewall
address 172.16.0.6
hostgroups firewalls
}

define hostgroup{
hostgroup_name firewalls ; The name of the hostgroup
alias Firewalls ; Long name of the group
}

define service{
use local-service ; Inherit values from a template
host_name paloalto
service_description Uptime
check_command check_snmp!-C maunakea -o sysUpTimeInstance
}

define service{
use local-service ; Inherit values from a template
host_name paloalto
service_description MGT Port Link Status
check_command check_snmp!-v 2c -C maunakea -o ifOperStatus.2 -r 1 -m RFC1213-MIB
}

When I run the snmpget for the two services stated above, I get...
[root@nagios-server-model ~]# snmpget -v2c -c maunakea 172.16.0.6 sysUpTimeInstance
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (581928) 1:36:59.28
[root@nagios-server-model ~]# snmpget -v2c -c maunakea 172.16.0.6 ifOperStatus.2
IF-MIB::ifOperStatus.2 = INTEGER: up(1)

However, I run "./check_snmp 172.16.0.6 -C maunakea -o sysUpTimeInstance" and "./check_snmp 172.16.0.6 -C maunakea -o ifOperStatus.2" and they both returned "CRITICAL - Plugin timed out while executing system call" message.

BUT, I get a critical state with the following information...

MGT Port Link Status
CRITICAL
06-29-2017 09:38:57
0d 0h 12m 19s
4/4
CRITICAL - Plugin timed out while executing system call


Uptime
CRITICAL
06-29-2017 09:39:42
0d 0h 11m 34s
4/4
CRITICAL - Plugin timed out while executing system call

I don't know what the problem is if I can get snmpget... please help.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: check_snmp problem

Post by cdienger »

Without the -P option check_snmp will use snmpv1. Try version 2 with:

./check_snmp 1.2.3.4 -P 2c -C maunakea -o sysUpTimeInstance
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

Re: check_snmp problem

Post by sartecat »

Thank you! That works!
Locked