Environmental Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Environmental Monitoring

Post by JohnFLi »

thank you.
I had already found the mibs i needed
but I went ahead and did your suggestions (just in case)

The output of the walk was the same as previously posted
Everybody is somebody else’s weirdo
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Environmental Monitoring

Post by dwhitfield »

What's the output of ll /usr/share/snmp/mibs?
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Environmental Monitoring

Post by JohnFLi »

i tried this:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H RoomALERT24E -o sysName.0 -C public -P 1 -m ROOMALERT24E-MIB
External command error: sysName.0: Unknown Object Identifier (Sub-id not found: (top) -> sysName)
i used iReasoning MIB Browser, and I was expecting it to return "A24 GE Room"
roomalert2.jpg

Code: Select all

[root@G1VPNAG03 mibs]# ll /usr/share/snmp/mibs
total 1824
-rw-rw-r-- 1 root   nagios  17455 Mar 22 04:45 AGENTX-MIB.txt
-rw-rw-r-- 1 root   nagios  50948 Mar 22 04:45 BRIDGE-MIB.txt
-rw-rw-r-- 1 root   nagios  68104 Mar 22 04:45 DISMAN-EVENT-MIB.txt
-rw-rw-r-- 1 root   nagios  24613 Mar 22 04:45 DISMAN-SCHEDULE-MIB.txt
-rw-rw-r-- 1 root   nagios  64311 Mar 22 04:45 DISMAN-SCRIPT-MIB.txt
-rw-rw-r-- 1 root   nagios  84492 Mar 22 04:45 EtherLike-MIB.txt
-rw-rw-r-- 1 root   nagios   4660 Mar 22 04:45 HCNUM-TC.txt
-rw-rw-r-- 1 root   nagios  52544 Mar 22 04:45 HOST-RESOURCES-MIB.txt
-rw-rw-r-- 1 root   nagios  10583 Mar 22 04:45 HOST-RESOURCES-TYPES.txt
-rw-rw-r-- 1 root   nagios   4819 Mar 22 04:45 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
-rw-rw-r-- 1 root   nagios  29665 Mar 22 04:45 IANAifType-MIB.txt
-rw-rw-r-- 1 root   nagios   4299 Mar 22 04:45 IANA-LANGUAGE-MIB.txt
-rw-rw-r-- 1 root   nagios   3513 Mar 22 04:45 IANA-RTPROTO-MIB.txt
-rw-rw-r-- 1 root   nagios   5066 Mar 22 04:45 IF-INVERTED-STACK-MIB.txt
-rw-rw-r-- 1 root   nagios  71691 Mar 22 04:45 IF-MIB.txt
-rw-rw-r-- 1 root   nagios  16782 Mar 22 04:45 INET-ADDRESS-MIB.txt
-rw-rw-r-- 1 root   nagios  46286 Mar 22 04:45 IP-FORWARD-MIB.txt
-rw-rw-r-- 1 root   nagios 185667 Mar 22 04:45 IP-MIB.txt
-rw-rw-r-- 1 root   nagios  15936 Mar 22 04:45 IPV6-ICMP-MIB.txt
-rw-rw-r-- 1 root   nagios  48703 Mar 22 04:45 IPV6-MIB.txt
-rw-rw-r-- 1 root   nagios   7257 Mar 22 04:45 IPV6-TCP-MIB.txt
-rw-rw-r-- 1 root   nagios   2367 Mar 22 04:45 IPV6-TC.txt
-rw-rw-r-- 1 root   nagios   4400 Mar 22 04:45 IPV6-UDP-MIB.txt
-rw-rw-r-- 1 root   nagios   5931 Mar 22 04:45 LM-SENSORS-MIB.txt
-rw-rw-r-- 1 root   nagios  42375 Mar 22 04:45 MTA-MIB.txt
-rwxrwx--- 1 root   nagios  19760 Oct  5  2016 NAGIOS-NOTIFY-MIB.txt
-rwxrwx--- 1 root   nagios   2093 Oct  5  2016 NAGIOS-ROOT-MIB.txt
-rw-rw-r-- 1 root   nagios  15901 Mar 22 04:45 NET-SNMP-AGENT-MIB.txt
-rw-rw-r-- 1 root   nagios   9160 Mar 22 04:45 NET-SNMP-EXAMPLES-MIB.txt
-rw-rw-r-- 1 root   nagios   9198 Mar 22 04:45 NET-SNMP-EXTEND-MIB.txt
-rw-rw-r-- 1 root   nagios   2036 Mar 22 04:45 NET-SNMP-MIB.txt
-rw-rw-r-- 1 root   nagios   3350 Mar 22 04:45 NET-SNMP-PASS-MIB.txt
-rw-rw-r-- 1 root   nagios   4686 Mar 22 04:45 NET-SNMP-TC.txt
-rw-rw-r-- 1 root   nagios   5039 Mar 22 04:45 NET-SNMP-VACM-MIB.txt
-rw-rw-r-- 1 root   nagios  21006 Mar 22 04:45 NETWORK-SERVICES-MIB.txt
-rw-rw-r-- 1 root   nagios  24694 Mar 22 04:45 NOTIFICATION-LOG-MIB.txt
drwxr-sr-x 2 apache nagios   4096 Sep 15 09:24 processed_mibs
-rw-rw-r-- 1 root   nagios   3067 Mar 22 04:45 RFC1155-SMI.txt
-rw-rw-r-- 1 root   nagios  79667 Mar 22 04:45 RFC1213-MIB.txt
-rw-rw-r-- 1 root   nagios   1174 Mar 22 04:45 RFC-1215.txt
-rw-rw-r-- 1 root   nagios 147822 Mar 22 04:45 RMON-MIB.txt
-rw-r--r-- 1 root   nagios  21543 Jul  6 02:15 ROOMALERT24E-MIB.mib
-rw-rw-r-- 1 root   nagios  45323 Mar 22 04:45 SCTP-MIB.txt
-rw-rw-r-- 1 root   nagios   4649 Mar 22 04:45 SMUX-MIB.txt
-rw-rw-r-- 1 root   nagios  15490 Mar 22 04:45 SNMP-COMMUNITY-MIB.txt
-rw-rw-r-- 1 root   nagios  22342 Mar 22 04:45 SNMP-FRAMEWORK-MIB.txt
-rw-rw-r-- 1 root   nagios   5496 Mar 22 04:45 SNMP-MPD-MIB.txt
-rw-rw-r-- 1 root   nagios  20014 Mar 22 04:45 SNMP-NOTIFICATION-MIB.txt
-rw-rw-r-- 1 root   nagios   9106 Mar 22 04:45 SNMP-PROXY-MIB.txt
-rw-rw-r-- 1 root   nagios  22769 Mar 22 04:45 SNMP-TARGET-MIB.txt
-rw-rw-r-- 1 root   nagios  39201 Mar 22 04:45 SNMP-USER-BASED-SM-MIB.txt
-rw-rw-r-- 1 root   nagios   2205 Mar 22 04:45 SNMP-USM-AES-MIB.txt
-rw-rw-r-- 1 root   nagios  21101 Mar 22 04:45 SNMP-USM-DH-OBJECTS-MIB.txt
-rw-rw-r-- 1 root   nagios   8263 Mar 22 04:45 SNMPv2-CONF.txt
-rw-rw-r-- 1 root   nagios  29305 Mar 22 04:45 SNMPv2-MIB.txt
-rw-rw-r-- 1 root   nagios   8924 Mar 22 04:45 SNMPv2-SMI.txt
-rw-rw-r-- 1 root   nagios  38034 Mar 22 04:45 SNMPv2-TC.txt
-rw-rw-r-- 1 root   nagios   5775 Mar 22 04:45 SNMPv2-TM.txt
-rw-rw-r-- 1 root   nagios  34162 Mar 22 04:45 SNMP-VIEW-BASED-ACM-MIB.txt
-rw-rw-r-- 1 root   nagios  28564 Mar 22 04:45 TCP-MIB.txt
-rw-rw-r-- 1 root   nagios  16418 Mar 22 04:45 TRANSPORT-ADDRESS-MIB.txt
-rw-rw-r-- 1 root   nagios   2163 Mar 22 04:45 UCD-DEMO-MIB.txt
-rw-rw-r-- 1 root   nagios   4402 Mar 22 04:45 UCD-DISKIO-MIB.txt
-rw-rw-r-- 1 root   nagios   3010 Mar 22 04:45 UCD-DLMOD-MIB.txt
-rw-rw-r-- 1 root   nagios   8118 Mar 22 04:45 UCD-IPFWACC-MIB.txt
-rw-rw-r-- 1 root   nagios  46150 Mar 22 04:45 UCD-SNMP-MIB.txt
-rw-rw-r-- 1 root   nagios  20882 Mar 22 04:45 UDP-MIB.txt
You do not have the required permissions to view the files attached to this post.
Everybody is somebody else’s weirdo
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Environmental Monitoring

Post by ssax »

When you run that command it's basically saying don't use any MIBs except for ROOMALERT24E-MIB, the problem with this is that you're trying to get a symbolic OID that is contained in another MIB, more specifically, the sysName definition is in the /usr/share/snmp/mibs/SNMPv2-MIB.txt MIB.

The -m option ONLY uses the MIBs that are listed, the default is -m ALL which will use all MIBs installed on the system.

The only thing the MIBs do on an snmpwalk/snmpget is to translate the numeric OIDs into symbolic OIDs.

So, sysName is actually 1.3.6.1.2.1.1.5:

Code: Select all

[root@ssc66xid mibs]# snmptranslate -Tz -m /usr/share/snmp/mibs/SNMPv2-MIB.txt
"org"                   "1.3"
"dod"                   "1.3.6"
"internet"                      "1.3.6.1"
"directory"                     "1.3.6.1.1"
"mgmt"                  "1.3.6.1.2"
"mib-2"                 "1.3.6.1.2.1"
"system"                        "1.3.6.1.2.1.1"
"sysDescr"                      "1.3.6.1.2.1.1.1"
"sysObjectID"                   "1.3.6.1.2.1.1.2"
"sysUpTime"                     "1.3.6.1.2.1.1.3"
"sysContact"                    "1.3.6.1.2.1.1.4"
"sysName"                       "1.3.6.1.2.1.1.5"
"sysLocation"                   "1.3.6.1.2.1.1.6"
...
...
...
...
So this should technically get the sysName:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H RoomALERT24E -o sysName.0 -C public -P 1 -m /usr/share/snmp/mibs/SNMPv2-MIB.txt
But you should receive the same by just running with the default:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H RoomALERT24E -o sysName.0 -C public -P 1
Or even with just the symbolic name (no MIB required):

Code: Select all

/usr/local/nagios/libexec/check_snmp -H RoomALERT24E -o 1.3.6.1.2.1.1.5.0 -C public -P 1
I hope that answers your questions and points you in the right direction, if you have any additional questions, please let us know.


Thank you
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Environmental Monitoring

Post by JohnFLi »

all 3 of your examples did give teh output I was expecting.

Thank you for that.....

I will see what kind of havock I cna cause now. ;)
Everybody is somebody else’s weirdo
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Environmental Monitoring

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: Environmental Monitoring

Post by JohnFLi »

yes, please close this thread.
Thank you
Everybody is somebody else’s weirdo
Locked