check_cisco.pl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ghemeon
Posts: 2
Joined: Tue Feb 07, 2012 1:38 pm

check_cisco.pl

Post 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
}
ghemeon
Posts: 2
Joined: Tue Feb 07, 2012 1:38 pm

Re: check_cisco.pl

Post by ghemeon »

nevermind this .. solved the problem
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: check_cisco.pl

Post 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
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: check_cisco.pl

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

Re: check_cisco.pl

Post 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.
Former Nagios employee
Locked