Page 1 of 1

Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 12:17 pm
by tfgroup
Afternoon!

Looking for some assistance with this plugin: http://exchange.nagios.org/directory/Pl ... st/details

I'm trying to set up some checks using it and am failing miserably (insert noob joke here)

Anyone using this successfully that may be able to give me an insight on what parameters to use to monitor things like CPU, Memory, Fan status, temperature, etc etc?

Thanks a ton!

Leo :D

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 12:24 pm
by tmcdonald
Here's what I get for help output when running the plugin with no switches:

Code: Select all

root@nagiosxi: /usr/local/nagios/libexec
$ ./check_cisco.pl
Syntax Error !
check-cisco.pl
-H = Ip/Dns Name of the Switch
-C = SNMP Community
-t = Check type
        temp    - Temperature
        fan     - Fan Fail
        ps      - Power Supply Fail
        cpu     - CPU Load
        mem     - Memory
        module          - Module Health
        freeint - Free eth interfaces for X days (-d)
        int - Interface Operation Stat (use with -i or -o)
-w = Warning Value
-c = Critical Value
-d = number of days that th ethernet interface hasn't change state, default is 14 (only for -t freeint)
-i = Interface Name (only for -t int)
-o = Interface OID (only for -t int)
So we're probably looking at a command like this for CPU usage:

Code: Select all

/usr/local/naigos/libexec/check_cisco.pl -H <ip address> -C <community string> -t cpu -w 80 -c 90
Also, I emailed Sales about getting you into the Customer forum and will move this thread when you are added.

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 12:35 pm
by tfgroup
OK. When I run the plugin by itself I get this:

root@usmia-nagiosp1: ./check-cisco.pl
./check-cisco.pl: line 6: syntax error near unexpected token `newline'
./check-cisco.pl: line 6: `<!DOCTYPE html>'

Trying the command, i get this:

[root@usmia-nagiosp1 /]# /usr/local/nagios/libexec/check-cisco.pl -H 10.151.1.254 -C us-itread -t cpu -w 80 -c 90
/usr/local/nagios/libexec/check-cisco.pl: line 6: syntax error near unexpected token `newline'
/usr/local/nagios/libexec/check-cisco.pl: line 6: `<!DOCTYPE html>'


I did notice that your plugin is check_cisco whereas mine is check-cisco. I'm downloading it from this link:

https://github.com/ranl/monitor-utils/b ... k-cisco.pl

Thanks for the Cusomter forum move :)

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 12:41 pm
by tmcdonald
It looks like you saved the whole webpage as opposed to the plugin itself. Try this link:

https://raw.githubusercontent.com/ranl/ ... k-cisco.pl

It's the same plugin, I just named mine differently to stick with the check_whatever naming scheme.

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 12:46 pm
by tfgroup
I had actually gone in and copied the pl script to a notepad and named the file but your link did work and I have the same result as you when i ran it this time. Thanks :)

Let me give it a go.

Thanks again!

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 2:54 pm
by slansing
Great! Give us a shout after you give the plugin a shot in it's native form. Copying scripts out to notepad then trying to use that can cause troubles, you will end up with Windows newline characters on your *nix systems when running them.

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 3:44 pm
by tfgroup
All good now, thank you again.

Re: Check Cisco Catalyst - plugin help

Posted: Wed Jul 09, 2014 3:50 pm
by tmcdonald
Awesome! I'll be closing this thread now, but feel free to open another if you need anything in the future!