How do I monitor Cisco CPU utilisation ?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by ssax »

This is how you would go about it:

Code: Select all

cd /usr/local/nagios/libexec
wget "https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=2609&cf_id=24" -O check_cisco_ips.pl
chmod +x check_cisco_ips.pl
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by vijilants »

Thanks SSAX.

Another question on the first plugin......

If I wish to monitor "hardware-health" what would be the command line for CCM Commands.

This is what I entered for CPU but I am confused as to what the ARGS 3 and 4 should read for hardware-health and on the service management what would I enter in the ARG 3 and ARG 4 Boxes ?

Code: Select all

$USER1$/check_nwc_health --hostname $HOSTADDRESS$ --mode $ARG1$ --community '$ARG2$' --warning $ARG3$ --critical $ARG4$ $ARG5$
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: How do I monitor Cisco CPU utilisation ?

Post by snapon_admin »

It's actually a perl script, so just save it as a .pl file. I believe I copied all of the text into notepad++ and then saved as check_cisco_ips.pl when I did it. Then you can just add it to Nagios by going to Admin > Manage components > upload component.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by vijilants »

snapon_admin wrote:It's actually a perl script, so just save it as a .pl file. I believe I copied all of the text into notepad++ and then saved as check_cisco_ips.pl when I did it. Then you can just add it to Nagios by going to Admin > Manage components > upload component.
Thanks Snapon!!

Can you please supply me your command line and what you entered for the ARGS for the service ?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by jdalrymple »

What you had below should be just fine:
vijilants wrote:

Code: Select all

$USER1$/check_nwc_health --hostname $HOSTADDRESS$ --mode $ARG1$ --community '$ARG2$' --warning $ARG3$ --critical $ARG4$ $ARG5$
$ARG3$ and $ARG4$ are thresholds, both appear to be measured in percentage. So create the command as written above, the do something like

$ARG1$: cpu-load
$ARG2$: test-123
$ARG3$: 80
$ARG4$: 90

Adjust to fit your needs.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by vijilants »

Thanks,

If I wish to monitor "hardware-health" what would be the command line for CCM Commands ?
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: How do I monitor Cisco CPU utilisation ?

Post by snapon_admin »

This is ours:

Code: Select all

$USER1$/check_nwc_health --t 60 --hostname $HOSTADDRESS$ --community $ARG1$ --mode hardware-health
The only threshold I can think of would be for temperature which I'm not eve nsure if you can specify that. By default it looks like the alert threshold is set for 60, which is a good alert threshold if that's Celsius. Everything else it monitors doesn't really require a threshold because it's stuff like PSUs being on or off, fans spinning or not, etc.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by vijilants »

snapon_admin wrote:This is ours:

Code: Select all

$USER1$/check_nwc_health --t 60 --hostname $HOSTADDRESS$ --community $ARG1$ --mode hardware-health
The only threshold I can think of would be for temperature which I'm not eve nsure if you can specify that. By default it looks like the alert threshold is set for 60, which is a good alert threshold if that's Celsius. Everything else it monitors doesn't really require a threshold because it's stuff like PSUs being on or off, fans spinning or not, etc.
OK, so without any threshold info, say if a fan or psu failed, how would this be shown in nagios ?.....Would it bring up some sort of a red alarm indication ?
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Re: How do I monitor Cisco CPU utilisation ?

Post by snapon_admin »

Yep, shows as a critical alert and will output something like "PSU 1 is bad" or "Fan 2 is bad" or something along those lines. I don't remember the exact syntax, but that's the gist. We got an alert that one of our fans failed on a core switch at one of our locations a few months ago using this plugin.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: How do I monitor Cisco CPU utilisation ?

Post by vijilants »

snapon_admin wrote:Yep, shows as a critical alert and will output something like "PSU 1 is bad" or "Fan 2 is bad" or something along those lines. I don't remember the exact syntax, but that's the gist. We got an alert that one of our fans failed on a core switch at one of our locations a few months ago using this plugin.

Great....that's exactly what I need.....Thank you.

Is there any way to permanently fix the situation where I have to run this command when I use the Test Command button under services ?

Code: Select all

rm -Rf /var/tmp/check_nwc_health
Locked