12-05-2024 02:30 AM
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
12-05-2024 03:31 AM
Make It simple
cd /usr/share/snmp/mibs
snmptranslate -On CISCO-PROCESS-MIB CISCO-PROCESS-MIB::cpmCPUTotalTable
12-12-2024 01:17 AM
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
12-12-2024 01:27 AM
usr/share/snmp/mibs$ snmptranslate -On CISCO-PROCESS-MIB::cpmCPUTotalTable
It seems the command is repeating CISCO-PROCESS-MIB
12-12-2024 02:38 AM
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
12-12-2024 02:41 AM
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
12-12-2024 02:59 AM
This site is good, which do you think gives me the CPU utilisation? https://mibs.observium.org/mib/CISCO-PROCESS-MIB/
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide