1

Using Collectd to poll Cisco gear via the snmp plugin. I have the needed Cisco mibs (CISCO-MEMORY-POOL-MIB and CISCO-PROCESS-MIB) loaded into net-snmp and snmpwalk can see them fine.

But when I try to add them into collectd I get the following error when restarting the collectd service:

Cannot find module (CISCO-MEMORY-POOL-MIB): At line 0 in (none)
Cannot find module (CISCO-PROCESS-MIB): At line 0 in (none)

the log file shows:

[2016-11-09 14:13:56] Exiting normally.
[2016-11-09 14:13:56] collectd: Stopping 5 read threads.
[2016-11-09 14:13:56] snmp plugin: read_objid (CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolName) failed.
[2016-11-09 14:13:56] snmp plugin: read_objid (CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolName) failed.
[2016-11-09 14:13:56] snmp plugin: snmp_parse_oid (CISCO-PROCESS-MIB::cpmCPUTotal5secRev) failed.
[2016-11-09 14:13:56] snmp plugin: No such data configured: `memory_free'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `memory_used'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `cisco_cpu'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `memory_free'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `memory_used'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `cisco_cpu'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `memory_free'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `memory_used'
[2016-11-09 14:13:56] snmp plugin: No such data configured: `cisco_cpu'
[2016-11-09 14:13:56] Initialization complete, entering read-loop.

Here is my snmp section of collectd.conf

<Plugin snmp>
  <Data "SysInfo">
      Type "counter"
      Table false
      Instance "sysName"
      Values  "SNMPv2-MIB::sysName"
  </Data>
  <Data "uptime">
     Type "uptime"
     Table false
     Instance "Uptime"
     scale 0.01
    Values  "DISMAN-EVENT-MIB::sysUpTimeInstance"
  </Data>
  <Data "if_octets">
      Type "if_octets"
      Table true
      Instance "IF-MIB::ifAlias"
      Values "IF-MIB::ifHCInOctets" "IF-MIB::ifHCOutOctets"
  </Data>
  <Data "if_errors">
    Type "if_errors"
    Table true
    Instance "IF-MIB::ifAlias"
    Values "IF-MIB::ifInErrors" "IF-MIB::ifOutErrors"
  </Data>
 <Data "memory_free">
    Type "memory_free"
    Table true
    Instance "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolName"
    Values  "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree"
  </Data>
  <Data "memory_used">
    Type "memory_used"
    Table true
    Instance "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolName"
    Values "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed"
  </Data>
  <Data "cisco_cpu">
      Type "cisco_cpu"
      Table true
      Values "CISCO-PROCESS-MIB::cpmCPUTotal5secRev" "CISCO-PROCESS-MIB::cpmCPUTotal1minRev" "CISCO-PROCESS-MIB::cpmCPUTotal5minRev"
  </Data>    

What am I missing here? Ive also tried using the OID address instead of name but I get nothing too.

2

Playing around with some settings and Im getting some success.

The CISCO-MEMORY-POOL PoolFree/Used works if I change the type to "gauge" and table to "false". Makes sense. But CISCO-PROCESS-MIB cpu returns as a percentage it looks like. Still cant get that one.

Here is how snmpwalk returns the OIDs:

[root@NMS-srv2 ~]# snmpwalk -v 2c -c rbhome spine1 CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree
CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree.1 = Gauge32: 564215448 bytes

[root@NMS-srv2 ~]# snmpwalk -v 2c -c rbhome spine1 CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed
CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed.1 = Gauge32: 249119560 bytes

[root@NMS-srv2 ~]# snmpwalk -v 2c -c rbhome spine1 CISCO-PROCESS-MIB::cpmCPUTotal1minRev
CISCO-PROCESS-MIB::cpmCPUTotal1minRev.7 = Gauge32: 1 percent

Here is the config right now.

 <Data "memory_used">
    Type "gauge"
    Table false
    Instance "memory_used"
    Values "1.3.6.1.4.1.9.9.48.1.1.1.5.1"
  </Data>
  <Data "cisco_cpu">
      Type "gauge"
      Table false
      Instance "cpu_used_min"
      Values "1.3.6.1.4.1.9.9.109.1.1.1.1.7.7" "1.3.6.1.4.1.9.9.109.1.1.1.1.8.7"
  </Data>  

Still cant figure out the MIB / OID name issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.