centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
311 stars 274 forks source link

Cisco IOS-XE: [network::cisco::standard::snmp::plugin] --mode=memory : not all memories will be checked #5136

Closed joschi99 closed 2 months ago

joschi99 commented 2 months ago

Cisco has introduced on never network devices based on IOS-XE new memories and actually they are not monitored. The missing memory is related to the "platform memory": https://community.cisco.com/t5/image/serverpage/image-id/219211iBED9AEF8325327F7/image-size/medium?v=v2&px=400

We have cases where the monitored memories are ok and no alert is raised, but the switch will do a reboot caused by the high platform memory usage.

There are special snmp OID's (https://mibs.observium.org/mib/CISCO-PROCESS-MIB/) to monitor this kind of memory:

In case of a stack usage the table will return the values for every single stack member.

We have also snmp walk and snmp mibs. Please not that this memory is not available on all models/firmwares, so you need to consider this and not raise a UNKNOW or some error if its not available.

lucie-dubrunfaut commented 2 months ago

Hello :)

According to my research in the memory mode code, it seems to manage three memory possibilities (and it is also possible to choose the order in which it explores them via the --check-order option):

Check memory in standard cisco mib. If you have some issue (wrong memory information in a specific mib), you can change the order 
(default: 'enhanced_pool,pool,process,system_ext').

One of these memory possibilities queries the OIDs mentioned above:

my $mapping_memory_process = {
    cpmCPUMemoryUsed        => { oid => '.1.3.6.1.4.1.9.9.109.1.1.1.1.12' }, # in KB
    cpmCPUMemoryFree        => { oid => '.1.3.6.1.4.1.9.9.109.1.1.1.1.13' }, # in KB
    cpmCPUMemoryUsedOvrflw  => { oid => '.1.3.6.1.4.1.9.9.109.1.1.1.1.16' }, # in KB
    cpmCPUMemoryFreeOvrflw  => { oid => '.1.3.6.1.4.1.9.9.109.1.1.1.1.18' }, # in KB
};

So maybe in your case you should check first process before enhanced_pool and pool?

joschi99 commented 2 months ago

thanks, this will solve the problem :-)