How to exclude MEMPOOL_HEAPCACHE_0_1 usage from check_nwc_health

I am continuously getting MEMPOOL_HEAPCACHE_0_1 usage alert from cisco devices which are monitored using check_nwc_health. As per the Cisco team, the Heapcache memory does not make any impact in device performance. Only system memory need to be monitored and MEMPOOL_HEAPCACHE_0_1 can be suppressed from monitoring. How should I suppress that?


image

I would start by looking at the check’s options – call the check command on the CLI, see if it has any filtering options (among threshold options too, if you wish).

Sometimes the commands need a -h or --help argument do display the options.

Hi,

it would be easier for us to know how you call the check (e.g. service definition) :wink: This check in particular is very powerful and has innumerable options for checking network devices
In other cases only the tip from @steaksauce is possible.

1 Like

also check the version of check_nwc_health.
v7.0.1.6+ has a fix implmented (at least for Cisco ASA)
image

To override the thresholds for a specific perfdata label you can use the criticalx and warningx parameters.

@stevie-sy , please find the Service and Command definition.

Service definition:

apply Service “Memory_Usage” {
import “service_check”
check_command = “check_nwc”
vars.nwc_mode = “memory-usage”
vars.nwc_warning = 80
vars.nwc_critical = 90
assign where host.vars.os == “cisco.ios”
assign where “Cisco FTD” in host.groups
}

Command definition:

object CheckCommand “check_nwc” {
import “plugin-check-command”
import “ipv4-or-ipv6”
command = [ “/usr/lib64/nagios/plugins/check_nwc_health” ]
arguments = {
“-H” = “$nwc_address$”
“–protocol” = “$snmp_protocol$”
“–username” = “$snmpv3_user$”
“–authpassword” = “$snmpv3_auth_key$”
“–authprotocol” = “$snmpv3_auth_alg$”
“–privprotocol” = “$snmpv3_priv_alg$”
“–privpassword” = “$snmpv3_priv_key$”
“–mode” = “$nwc_mode$”
“–warning” = “$nwc_warning$”
“–critical” = “$nwc_critical$”
“–name” = “$nwc_name$”
“–timeout” = “$nwc_timeout$”
}

vars.nwc_address = “$check_address$”
vars.snmp_protocol = “3”
vars.snmpv3_user = “$$$$”
vars.snmpv3_auth_key = “$$$$”
vars.snmpv3_auth_alg = “SHA”
vars.snmpv3_priv_alg = “AES”
vars.snmpv3_priv_key = “$$$$”
vars.nwc_timeout = “50”
}

@log1c, check_nwc_health $Revision: 7.10.0.1. Also the device it Cisco FTD

I can’t catch similar performance counters from our cisco devices with the mentioned check mode.
And it looks like there is no supress function, if I read the docs again.

It looks like you have two options:

  • you use the parameter criticalx and warningx like @log1c mentioned. And you set threshold values with which this one value is always ok.
  • you write a wrapper script for such devices. With this script you pass the output for example to sed or awk. With same regex you could filter the output.