Page 1 of 2

How to alert on network bandwidth with DL360?

Posted: Sat Apr 12, 2014 1:04 pm
by jbruyet
Hey all, I finally found a MIB that has OIDs for TxBytesPerSec and RxBytesPerSec for my DL360 servers but I don't know enough about snmp yet to figure out how to include the interface. Here's what I want from the MIB:

Code: Select all

 cpqLinOsNetworkInterfaceTxBytesPerSec OBJECT-TYPE
        SYNTAX  INTEGER
        ACCESS  read-only
        STATUS  mandatory
        DESCRIPTION
       "Number of bytes per second that were transmitted from the network
             interface."
        ::= { cpqLinOsNetworkInterfaceEntry 5 }
I'm guessing from the first line that I need the "label" for the interface. Here's what I'm using pulled from snmpwalk:

Code: Select all

IF-MIB::ifDescr.65539 = STRING: HP Network Team #1
I know that's correct because I can pull this:

Code: Select all

root@FreeNag:/usr/home/jobee/SNMP # snmpget -v 2c -c public 192.168.2.29 ifDescr.65539
IF-MIB::ifDescr.65539 = STRING: HP Network Team #1
I've tried fronting with both of these:

Code: Select all

cpqLinOsNetworkInterface Group  (1.3.6.1.4.1.232.23.2.10)
cpqLinOsNetworkInterfaceTable   (1.3.6.1.4.1.232.23.2.10.2)

Put them together and I get this:

Code: Select all

root@FreeNag:/usr/home/jobee/SNMP # snmpget -v 2c -c public 192.168.2.29 1.3.6.1.4.1.232.23.2.10.2.cpqLinOsNetworkInterfaceRxBytes.65539
1.3.6.1.4.1.232.23.2.10.2.cpqLinOsNetworkInterfaceRxBytes.65539: Unknown Object Identifier (Sub-id not found: enterprises -> cpqLinOsNetworkInterfaceRxBytes.65539)
root@FreeNag:/usr/home/jobee/SNMP #
I've tried some different combinations here but always no joy. So, am I missing something? Overlooking something?

Thanks,

Joe B

Re: How to alert on network bandwidth with DL360?

Posted: Mon Apr 14, 2014 2:22 pm
by sreinhardt
Could you post the mib or a link to it, where you found this oid. It looks like you are missing a mib that is a dependency of this one. Since it does not know what some of these shortnames are.

Re: How to alert on network bandwidth with DL360?

Posted: Tue Apr 15, 2014 11:56 am
by jbruyet
Here's the MIB where I found the OID. I have just enough experience with snmp to muddle through most problems so don't worry that I might think you're being condescending with any explanations.

Thanks,

Joe B

Re: How to alert on network bandwidth with DL360?

Posted: Tue Apr 15, 2014 6:56 pm
by jbruyet
Ok sreinhardt, I just downloaded a full folder's-worth of mibs and put them in my server. Here are my current errors:

Code: Select all

root@FreeNag:/usr/local/share/snmp/mibs # snmpget -v 2c -c public 192.168.2.29 1.3.6.1.4.1.232.23.2.10.2.65539.cpqLinOsNetworkInterfaceRxBytes
Did not find 'mib-2' in module SNMPv2-SMI-v1 (/usr/local/share/snmp/mibs/host-resources-mib.mib)
Unlinked OID in HOST-RESOURCES-MIB: host ::= { mib-2 25 }
Undefined identifier: mib-2 near line 109 of /usr/local/share/snmp/mibs/host-resources-mib.mib
Did not find 'hrMIBAdminInfo' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)
Did not find 'hrStorage' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)
Did not find 'hrDevice' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)
Unlinked OID in HOST-RESOURCES-TYPES: hostResourcesTypesModule ::= { hrMIBAdminInfo 4 }
Undefined identifier: hrMIBAdminInfo near line 7 of /usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
Unlinked OID in HOST-RESOURCES-TYPES: hrFSTypes ::= { hrDevice 9 }
Undefined identifier: hrDevice near line 226 of /usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
Unlinked OID in HOST-RESOURCES-TYPES: hrDeviceTypes ::= { hrDevice 1 }
Undefined identifier: hrDevice near line 108 of /usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
Unlinked OID in HOST-RESOURCES-TYPES: hrStorageTypes ::= { hrStorage 1 }
Undefined identifier: hrStorage near line 37 of /usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/local/share/snmp/mibs/IP-MIB.txt)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/local/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
1.3.6.1.4.1.232.23.2.10.2.65539.cpqLinOsNetworkInterfaceRxBytes: Unknown Object Identifier (Sub-id not found: enterprises -> cpqLinOsNetworkInterfaceRxBytes)
I've checked a couple of random mibs in the error and they do have the OIDs that it's looking for. I'm getting ready to head home so I'll do a deeper job of spelunking when I get here tomorrow.

Thanks,

Joe B

Re: How to alert on network bandwidth with DL360?

Posted: Wed Apr 16, 2014 3:50 pm
by lmiltchev
We also need to do some digging into this. We will get back to you sometime tomorrow.

Re: How to alert on network bandwidth with DL360?

Posted: Thu Apr 17, 2014 10:23 am
by sreinhardt
We are still having some dependency issues here. What I am looking at that tells me this is happening is:

Code: Select all

Unlinked OID in HOST-RESOURCES-MIB: host ::= { mib-2 25 }
Undefined identifier: mib-2 near line 109 of /usr/local/share/snmp/mibs/host-resources-mib.mib
This means that the mib usr/local/share/snmp/mibs/host-resources-mib.mib, references an oid\shortname mib-2 25 that no other currently loaded mib contains. Other errors you are seeing, might be related to oids\shortnames that should be within an already loaded mib or the same mib that snmpget was reading, that don't seem to be properly linked.

Code: Select all

Did not find 'hrMIBAdminInfo' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)

Re: How to alert on network bandwidth with DL360?

Posted: Tue Apr 22, 2014 3:36 pm
by jbruyet
Thanks sreinhardt. I will start grep'ing files to see if I can find what the program is looking for.

Thanks,

Joe B

Re: How to alert on network bandwidth with DL360?

Posted: Tue Apr 22, 2014 3:41 pm
by abrist
Great. Lets us know what you find.

Re: How to alert on network bandwidth with DL360?

Posted: Wed Apr 23, 2014 4:05 pm
by jbruyet
Well, I've done some work with SNMP but now I'm starting to think I may have missed something in getting the files accessible. FWIW I downloaded the MIBs from HP's web site, unzipped them and copied them over to /usr/local/share/snmp/mibs. Anyway, I'm finding the items that snmpget is having problems with. For example:

Did not find 'mib-2' in module SNMPv2-SMI-v1 (/usr/local/share/snmp/mibs/host-resources-mib.mib)

Code: Select all

root@FreeNag:/usr/local/share/snmp/mibs # grep mib-2 host-resources-mib.mib
    mib-2
host            OBJECT IDENTIFIER ::= { mib-2 25 }
Unlinked OID in HOST-RESOURCES-MIB: host ::= { mib-2 25 } (<-- all caps MIB doesn’t exist)

Code: Select all

host            OBJECT IDENTIFIER ::= { mib-2 25 }
Undefined identifier: mib-2 near line 109 of /usr/local/share/snmp/mibs/host-resources-mib.mib

Code: Select all

host            OBJECT IDENTIFIER ::= { mib-2 25 }
This is line 109.

Did not find 'hrMIBAdminInfo' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)

Code: Select all

root@FreeNag:/usr/local/share/snmp/mibs # grep hrMIBAdminInfo HOST-RESOURCES-TYPES.txt
  hrMIBAdminInfo, hrStorage, hrDevice     FROM HOST-RESOURCES-MIB;
  ::= { hrMIBAdminInfo 4 }
Did not find 'hrStorage' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)

Code: Select all

root@FreeNag:/usr/local/share/snmp/mibs # grep hrStorage HOST-RESOURCES-TYPES.txt
  hrMIBAdminInfo, hrStorage, hrDevice     FROM HOST-RESOURCES-MIB;
-- Registrations for some storage types, for use with hrStorageType
hrStorageTypes          OBJECT IDENTIFIER ::= { hrStorage 1 }
hrStorageOther OBJECT-IDENTITY
    ::= { hrStorageTypes 1 }
hrStorageRam OBJECT-IDENTITY
    ::= { hrStorageTypes 2 }
This list went up to 10 object IDs

Did not find 'hrDevice' in module HOST-RESOURCES-MIB (/usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt)

Code: Select all

root@FreeNag:/usr/local/share/snmp/mibs # grep hrDevice HOST-RESOURCES-TYPES.txt
  hrMIBAdminInfo, hrStorage, hrDevice     FROM HOST-RESOURCES-MIB;
-- Registrations for some device types, for use with hrDeviceType
hrDeviceTypes             OBJECT IDENTIFIER ::= { hrDevice 1 }
hrDeviceOther OBJECT-IDENTITY
    ::= { hrDeviceTypes 1 }
hrDeviceUnknown OBJECT-IDENTITY
    ::= { hrDeviceTypes 2 }
This list went up to 21 devices.

Could this be an issue with case-sensitive names or extensions?

Code: Select all

root@FreeNag:/usr/local/share/snmp/mibs # ls -l host-resources*
-rw-r--r--  1 root  wheel  35164 Apr 15 15:56 host-resources-mib.cfg
-rw-r--r--  1 root  wheel  49362 Apr 15 15:56 host-resources-mib.mib
root@FreeNag:/usr/local/share/snmp/mibs # ls -l HOST-RESOURCES*
-r--r--r--  1 root  wheel  52544 Mar 13  2013 HOST-RESOURCES-MIB.txt
-r--r--r--  1 root  wheel  10583 Mar 13  2013 HOST-RESOURCES-TYPES.txt
root@FreeNag:/usr/local/share/snmp/mibs #
Thanks,

Joe B

Re: How to alert on network bandwidth with DL360?

Posted: Wed Apr 23, 2014 6:52 pm
by jbruyet
Wow, I just tried to do an snmpwalk for another server and I'm getting the same errors. I'm afraid if I did a "service nagios restart" my Nagios-monitored devices would implode.

Thanks,

Joe B