<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
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>
</body>
</html>