cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
445
Views
2
Helpful
6
Replies

SNMPwalk and SNMPtranslate help

ajwhite0
Level 1
Level 1

Hello,

I've been asked to retrieve the CPU and Memory utilisation via SNMP (SNMP_Exporter).

I'm on a Ubunut VM and I've downloaded these 2 MIB files into :  /usr/share/snmp/mibs/

 

 

CISCO-PROCESS-MIB
CISCO-MEMORY-POOL

 

 

I want to get the CPU and Memory utilisation from a number of switches.  This SNMPtranslate fails though, what am I doing wrong?

 

 

snmptranslate -On -IR -M + /usr/share/snmp/mibs/ -m +CISCO-PROCESS-MIB CISCO-PROCESS-MIB::cpmCPUTotalTable

 

 

https://github.com/librenms/librenms-mibs/blob/master/CISCO-PROCESS-MIB

https://github.com/librenms/librenms-mibs/blob/master/OLD-CISCO-MEMORY-MIB

Thanks

 

6 Replies 6

@ajwhite0 

Make It simple

cd /usr/share/snmp/mibs

snmptranslate -On CISCO-PROCESS-MIB CISCO-PROCESS-MIB::cpmCPUTotalTable

ajwhite0
Level 1
Level 1

Hi @Flavio Miranda 

I get:

/usr/share/snmp/mibs$ snmptranslate -On CISCO-PROCESS-MIB CISCO-PROCESS-MIB::cpmCPUTotalTable
CISCO-PROCESS-MIB: Unknown Object Identifier (Sub-id not found: (top) -> CISCO-PROCESS-MIB)

/usr/share/snmp/mibs$ ls
CISCO-MEMORY-POOL NET-SNMP-AGENT-MIB.txt NET-SNMP-MIB.txt NET-SNMP-VACM-MIB.txt UCD-DLMOD-MIB.txt
CISCO-PROCESS-MIB NET-SNMP-EXAMPLES-MIB.txt NET-SNMP-PASS-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt
LM-SENSORS-MIB.txt NET-SNMP-EXTEND-MIB.txt NET-SNMP-TC.txt UCD-DISKIO-MIB.txt UCD-SNMP-MIB.txt

@ajwhite0 

usr/share/snmp/mibs$ snmptranslate -On CISCO-PROCESS-MIB::cpmCPUTotalTable

It seems the command is repeating  CISCO-PROCESS-MIB

Thanks, I get this:

 

/usr/share/snmp/mibs# snmptranslate -On CISCO-PROCESS-MIB::cpmCPUTotalTable
MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf
Cannot find module (SNMPv2-TC): At line 31 in /usr/share/snmp/mibs/CISCO-PROCESS-MIB
Cannot find module (SNMP-FRAMEWORK-MIB): At line 33 in /usr/share/snmp/mibs/CISCO-PROCESS-MIB
Cannot find module (CISCO-TC): At line 35 in /usr/share/snmp/mibs/CISCO-PROCESS-MIB
Cannot find module (CISCO-SMI): At line 37 in /usr/share/snmp/mibs/CISCO-PROCESS-MIB
Did not find 'TimeStamp' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'DisplayString' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'RowStatus' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'TruthValue' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'RowPointer' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'SnmpAdminString' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'EntPhysicalIndexOrZero' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Did not find 'ciscoMgmt' in module #-1 (/usr/share/snmp/mibs/CISCO-PROCESS-MIB)
Unlinked OID in CISCO-PROCESS-MIB: ciscoProcessMIB ::= { ciscoMgmt 109 }
Undefined identifier: ciscoMgmt near line 40 of /usr/share/snmp/mibs/CISCO-PROCESS-MIB
CISCO-PROCESS-MIB::cpmCPUTotalTable: Unknown Object Identifier

ajwhite0
Level 1
Level 1

 manual walk:

sudo snmpwalk -v2c -c public 192.168.1.1 1.3.6.1.4.1.9.9.109.1.1.1.1.8
iso.3.6.1.4.1.9.9.109.1.1.1.1.8.19 = Gauge32: 3
iso.3.6.1.4.1.9.9.109.1.1.1.1.8.20 = Gauge32: 2
iso.3.6.1.4.1.9.9.109.1.1.1.1.8.21 = Gauge32: 2
iso.3.6.1.4.1.9.9.109.1.1.1.1.8.22 = Gauge32: 2

ajwhite0
Level 1
Level 1

This site is good, which do you think gives me the CPU utilisation?  https://mibs.observium.org/mib/CISCO-PROCESS-MIB/