Page 1 of 1

check_cisco.pl

Posted: Tue Feb 07, 2012 1:51 pm
by ghemeon
Cannot seem to get the plugin check_cisco.pl to work from nagios ... What am i doing wrong?
pre-flight check shows nothing wrong ..

From terminal it runs fine ..

/opt/nagios/libexec # perl check_cisco.pl -H 10.10.10.10 -C yadayada -t mem -w 20%
Memory: OK - Free Memory 57% | memory_total=76MB memory_used=31MB


Nagios returns a null when it is used in nagios configuration ..

# SNMP Check Cisco - Memory
define command{
command_name check_cisco_mem
command_line $USER1$/check_cisco.pl -H $HOSTADDRESS$ -C yadayada -t mem -w 25% -c 15%
}

define host{
use switches-template
host_name cisco_3750
alias Switch
address 10.10.10.10
hostgroups switches
}

define service{
use local-service
hostgroup_name switches
service_description Memory Usage
check_command check_cisco_mem
}

Re: check_cisco.pl

Posted: Tue Feb 07, 2012 4:00 pm
by ghemeon
nevermind this .. solved the problem

Re: check_cisco.pl

Posted: Tue Feb 07, 2012 7:18 pm
by jsmurphy
What are the permissions on check_cisco.pl does the nagios user have access to execute it? I noticed you executed it as perl check_cisco.pl what happens if you omit that and just run it as ./check_cisco.pl

Re: check_cisco.pl

Posted: Mon Apr 14, 2014 10:10 pm
by phyo
ghemeon wrote:nevermind this .. solved the problem
Hi Ghemeon,

How did you solve this problem? Now I also having this problem when I monitor Cisco ASR9010 Router Fan status.
The output show as below.

Code: Select all

Fans: OK - 0 Fans are running all good | total=0 err=0
And another problem is when I monitor the free memory, it's showed free memory is 1%.

Code: Select all

Memory: CRIT - Free Memory 1% Memory_total=1791MB Memory_used=1767MB | memory_total=1791MB memory_used=1767MB
When I checked with the guy from network site, he check from CLI and the output show as below.

Code: Select all

Physical Memory: 6144M total (4120M available)
 Application Memory : 5887M (4120M available)
 Image: 63M (bootram: 63M)
 Reserved: 128M, IOMem: 64K, flashfsys: 0
 Total shared window: 41M
For temperature, the output show

Code: Select all

./check_c4510.pl -H 10.110.40.23 -C nagios -t temp -w 45 -c 55
The switch 10.110.40.23 can't report temperature via SNMP
Syntax Error! "
Waiting for your reply :)

Re: check_cisco.pl

Posted: Tue Apr 15, 2014 9:47 am
by tmcdonald
phyo, this thread is from 2012 and ghemon has not been back since he posted this. Please do not dig up old threads. If you have a question feel free to open a new thread regarding your issue.