Cold Standby SNMP

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Cold Standby SNMP

Post 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?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Cold Standby SNMP

Post 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
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Cold Standby SNMP

Post 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]#
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Cold Standby SNMP

Post 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
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Cold Standby SNMP

Post 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.
dslaughter
Posts: 128
Joined: Wed Feb 20, 2019 3:46 pm

Re: Cold Standby SNMP

Post 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.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Cold Standby SNMP

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Cold Standby SNMP

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked