Page 1 of 1

Cold Standby SNMP

Posted: Wed Feb 24, 2021 9:03 am
by dslaughter
I have setup a cold standby server and restored from backup. One of the mibs that is installed is not working. I see the mib in Admin->Manage MIBs and the mib does exists in /usr/share/snmp/mibs. When I run the snmp command I get

/usr/local/nagios/libexec/check_snmp -v -H x.x.x.x -p 161 -o ENTITY-SENSOR-MIB::entPhySensorValue.100006001 -C <community> -P 2c -w 450 -c 500
/bin/snmpget -Le -t 3 -r 5 -m ALL -v 2c [context] [authpriv] x.x.x.x:161 ENTITY-SENSOR-MIB::entPhySensorValue.100006001
External command error: MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (ENTITY-SENSOR-MIB): At line 0 in (none)
ENTITY-SENSOR-MIB::entPhySensorValue.100006001: Unknown Object Identifier

Is there configuration outside of nagiosxi I need to do after the initial restore?

Re: Cold Standby SNMP

Posted: Thu Feb 25, 2021 11:12 am
by ssax
It should work if the mib is there, is that check failing if you run it from the CLI through an SSH session?

What is the output of this command?

Code: Select all

grep 'ENTITY-SENSOR-MIB DEF' /usr/share/snmp/mibs/*
What the permissions on the mib file?

Code: Select all

ls -l /usr/share/snmp/mibs/themibfile.ext

Re: Cold Standby SNMP

Posted: Thu Feb 25, 2021 1:41 pm
by dslaughter
The output I posted is from an ssh session.

Here is the grep output.

[root@z2-nms-1 mibs]# grep -r 'ENTITY-SENSOR-MIB DEF' /usr/share/snmp/mibs/*
/usr/share/snmp/mibs/ARISTA-ENTITY-SENSOR-MIB.txt:ARISTA-ENTITY-SENSOR-MIB DEFINITIONS ::= BEGIN
/usr/share/snmp/mibs/ENTITY-SENSOR-MIB.mib:ENTITY-SENSOR-MIB DEFINITIONS ::= BEGIN
[root@z2-nms-1 mibs]#

Here is the permissions for the mib file.

[root@z2-nms-1 mibs]# ls -l /usr/share/snmp/mibs/ENTITY-SENSOR-MIB.mib
-rw-rw-r-- 1 root nagios 16710 Feb 17 16:22 /usr/share/snmp/mibs/ENTITY-SENSOR-MIB.mib
[root@z2-nms-1 mibs]#

Re: Cold Standby SNMP

Posted: Fri Feb 26, 2021 6:26 pm
by ssax
Does this work?

Code: Select all

/usr/local/nagios/libexec/check_snmp -v -H x.x.x.x -p 161 -o ENTITY-SENSOR-MIB::entPhySensorValue.100006001 -C <community> -P 2c -w 450 -c 500 -m ENTITY-SENSOR-MIB
I downloaded to my system and then tested and it finds it properly.

I know it sounds dumb, but try doing this:

Code: Select all

service snmpd restart
service snmptrapd restart
snmpwalk -v 2c -c 'yourcommunity' 192.168.X.X:161 -m ENTITY-SENSOR-MIB ENTITY-SENSOR-MIB::entPhySensorValue.100006001
There is a mib index file that may not be updated and I think one of those will update it.

Then try the command again:

Code: Select all

/usr/local/nagios/libexec/check_snmp -v -H x.x.x.x -p 161 -o ENTITY-SENSOR-MIB::entPhySensorValue.100006001 -C <community> -P 2c -w 450 -c 500

Re: Cold Standby SNMP

Posted: Tue Mar 02, 2021 10:17 am
by dslaughter
Thank you for your assistance.

Still got the same results from the commands you sent.

This is a standby server that was restored using the production server backup. The check does work correctly on production. I think I missed something in snmp setup but cannot find it. Everything I have tried hasn't worked.

Re: Cold Standby SNMP

Posted: Tue Mar 02, 2021 10:24 am
by dslaughter
I forgot to mention the new standby is a clean install of centos7 and then did a restore using the backup file produced by nagiosxi in the local backup archives.

Re: Cold Standby SNMP

Posted: Wed Mar 03, 2021 6:47 pm
by benjaminsmith
HI,
I forgot to mention the new standby is a clean install of centos7 and then did a restore using the backup file produced by nagiosxi in the local backup archives.
Honestly, not sure why this is not working for you. I'm going to reach out to a few Sean and the rest of the team and follow up shortly with you.

Best Regards,
Benjamin

Re: Cold Standby SNMP

Posted: Thu Mar 04, 2021 4:45 pm
by benjaminsmith
Hi,

After discussing this with the team, we feel it would be best to open a ticket for the issue and we'll get a remote session setup to debug this further.

To open a support ticket, go to:
https://support.nagios.com/tickets/

and reference this post.

Thanks!
Benjamin