Check Cisco Catalyst - plugin help

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tfgroup
Posts: 13
Joined: Mon Apr 07, 2014 8:56 am

Check Cisco Catalyst - plugin help

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check Cisco Catalyst - plugin help

Post 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.
Former Nagios employee
tfgroup
Posts: 13
Joined: Mon Apr 07, 2014 8:56 am

Re: Check Cisco Catalyst - plugin help

Post 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 :)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check Cisco Catalyst - plugin help

Post 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.
Former Nagios employee
tfgroup
Posts: 13
Joined: Mon Apr 07, 2014 8:56 am

Re: Check Cisco Catalyst - plugin help

Post 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!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check Cisco Catalyst - plugin help

Post 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.
tfgroup
Posts: 13
Joined: Mon Apr 07, 2014 8:56 am

Re: Check Cisco Catalyst - plugin help

Post by tfgroup »

All good now, thank you again.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check Cisco Catalyst - plugin help

Post by tmcdonald »

Awesome! I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked