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
}
check_cisco.pl
Re: check_cisco.pl
nevermind this .. solved the problem
Re: check_cisco.pl
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
Hi Ghemeon,ghemeon wrote:nevermind this .. solved the problem
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
Code: Select all
Memory: CRIT - Free Memory 1% Memory_total=1791MB Memory_used=1767MB | memory_total=1791MB memory_used=1767MB
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
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! "
Re: check_cisco.pl
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.
Former Nagios employee