<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Actually, i have another one in the same situation, when executed
manualy, it is working:<br>
<br>
<i>nagios@mon2:/usr/local/nagios/libexec$ ./check_catalyst_mem.pl -s
172.31.0.100 -C xxx -w 30 -c 20<br>
OK: I/O: valid, Used: 25189592B Free: 41919272B (62%)! Processor:
valid, Used: 114067808B Free: 801243696B (87%)!|WARING <= 30%,
CRITICAL <= 20%</i><br>
<br>
But, when i define a service for it, it does not do the checking
corectly: Status Critical and null status information:<br>
<br>
<br>
<i>define command {<br>
command_name check_catalyst_mem<br>
command_line $USER1$/check_catalyst_mem.pl -s
$HOSTADDRESS$ $ARG1$<br>
}<br>
<br>
define service {<br>
use generic-service<br>
host_name VSS6509<br>
service_description Memory<br>
check_command check_catalyst_mem!-C xxx -w 30 -c
20<br>
}</i><br>
<br>
What's wrong with this definitions and why nagios does not check
corect?<br>
<br>
<br>
<pre class="moz-signature" cols="72"> Cosmin Neagu
</pre>
<br>
On 10/31/2011 10:22 AM, Cosmin Neagu wrote:
<blockquote cite="mid:4EAE5AA9.2070300@omnilogic.ro" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hello,<br>
I'm trying to monitor bgp session, and i came upon the following
script check_bgp.<br>
When i run it manually, it checks the bgp session OK:<br>
<br>
<i>nagios@mon2:/usr/local/nagios/libexec$ ./check_bgp.pl -H
X.X.X.X -C xxx -p Y.Y.Y.Y<br>
OK - Y.Y.Y.Y (AS12345) state is established(6). Established for
69d9h34m43s. Last error "Hold Timer Expired".<br>
</i><br>
<br>
But, when i define the command, and add a service for it, it does
not work. In nagios, i get CRITICAL status and <i>null</i> Status
information.<br>
Using nagios 3.2.3<br>
<br>
<br>
<br>
<br>
<i>define command {<br>
command_name check_bgp<br>
command_line $USER1$/check_bgp.pl -H $HOSTADDRESS$
$ARG1$<br>
}</i><br>
<i>define service {<br>
use generic-service<br>
host_name EDGE<br>
service_description eBGP to AS12345 <br>
check_command check_bgp!-C abcd -p Y.Y.Y.Y<br>
}</i><br>
<br>
So, what am i doing wrong? I have about 300 diferent services, and
all checks works fine, this is the first time when a script works
when invoked manually but not when invoked by nagios. Please help.<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Cosmin Neagu
</pre>
</blockquote>
</body>
</html>