Hi Team,
Its noted that, i am not getting expected output in the Icinga UI with the snmp polling. I am using snmpV3 in my environment.
I am getting expected value while doing snmpwalk from the server. Please find the results below for your references:
[root@TRVUSTMMVLMON01 master]# snmpwalk -v 3 -u emadmin -a SHA -A ‘xxxxxx’ -l authPriv -x AES -X ‘xxxxxxx’ 172.21.113.66 1.3.6.1.4.1.5951.4.1.1.41.1
SNMPv2-SMI::enterprises.5951.4.1.1.41.1.0 = Gauge32: 1
first of all you should not write passwords in a post
what is the output if you run the the check command (not snmp walk) in the bash (with the root and icinga/nagios user)? Maybe a permission error (like SELinux if turned on)
[root@TRVUSTMMVLMON01 plugins]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Please see the various output of the snmp walk and check_snmp:
[root@TRVUSTMMVLMON01 plugins]# ./check_snmp -H 172.21.113.66 -P 3 -a SHA -x AES -U ‘emadmin’ -A ‘xxxxx’ -X ‘xxxxxx’ -L authPriv -o 1.3.6.1.4.1.5951.4.1.1.41.1
SNMP OK - No Such Instance currently exists at this OID |
Just a generic hint: Try executing the command as the icinga user to see problems related to permissions. That would be sudo -u icinga on CentOS etc or sudo -u nagios on debian.
I ran as icinga user and below is the input i am getting.
sudo -u icinga /usr/lib64/nagios/plugins/check_snmp -H 172.21.113.66 -P 3 -a SHA -x AES -U ‘emadmin’ -A ‘xxx’ -X ‘xxxx’ -L authPriv -o 1.3.6.1.4.1.5951.4.1.1.41.1 SNMP OK - No Such Instance currently exists at this OID
I meant not the icinga2 log, I meant the device you want to check (switch, router or whatever) has maybe a log where you could see the requests from the icinga server
That the check is running successfully on your icinga server shows the output from snmpwalk and check_snmp. The only difference is here, that one catch a correct result and the other one not.