pnp4nagios Cisco switch memory and load?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
kuchenmann
Posts: 10
Joined: Fri Jun 23, 2023 10:54 pm

pnp4nagios Cisco switch memory and load?

Post by kuchenmann »

HI,
I am not sure, should pnp4nagios also work for Cisco memory and load?
Using plugins check_snmp_cisco_memutil and check_snmp_cisco_loadavg.
I was pretty sure that I've already seen this in pnp4nagios.
But now I'm only getting errors *.XML not found.
On the other hand, pnp4nagios for pings is still working and also e.g. different checks for servers showing graphs with pnp4nagios.
Maybe I'm wrong and I've never got pnp4nagios graphs for the load and memory of Cisco switches?
Thanks.
kuchenmann
Posts: 10
Joined: Fri Jun 23, 2023 10:54 pm

Re: pnp4nagios Cisco switch memory and load?

Post by kuchenmann »

Ok, I found a solution for these two plugins.
Because they are not binary, it's possible to edit them.
Adding pipe and value to the output, then the perfdata files are created for pnp4nagios.

check_snmp_cisco_loadavg
if ($status == 0){
# I've added |CPU=$cpu5min to get data for pnp4nagios.
print "Status is OK - $returnstring\n|CPU=$cpu5min";
}

check_snmp_cisco_memutil
if ($status == 0){
# I've added |MEMUSED=$mempcused to get data for pnp4nagios.
print "Status is OK - $returnstring\n|MEMUSED=$mempcused";
}
Post Reply