hi,<br> i am using xymon -4.2.2.<br>I have written one extension script (server side script) for monitoring k3b service on each machine including server and clients also.On one of my clients and on server itself,the service is not running.on other two clients service is running.<br>
I am getting same green status on all clients as well as server stating k3b is running.when i checked on each client,server and 2 clients do not run this service.;but i am getting green for that also....wt is wrong?<br>steps i fallowd are,<br>
<br clear="all"><pre style="margin: 0em;">In ~/server/etc/hobbitlaunch.cfg added<br><br></pre><br><pre style="margin: 0em;">k3b]<br>    ENVFILE /home/hobbit/server/etc/hobbitserver.cfg<br>    NEEDS hobbitd<br>    CMD $BBHOME/ext/k3b<br>
    LOGFILE $BBSERVERLOGS/k3b.log<br>    INTERVAL 5m<br><br>in bb-hosts,added k3b for every host..<br><br><br>In ~/server/ext/k3b, added:<br><br>#!/bin/sh<br>BBHTAG=k3b           # What we put in bb-hosts to trigger this test<br>
COLUMN=k3b    # Name of the column, often same as tag in bb-hosts<br>$BBHOME/bin/bbhostgrep $BBHTAG | while read L<br>do<br>  set $L    # To get one line of output from bbhostgrep<br>  HOSTIP="$1"<br>  MACHINEDOTS="$2"<br>
  MACHINE=`echo $2 | $SED -e's/\./,/g'`<br>  MSG="$BBHTAG status for host $MACHINEDOTS"<br>op=`ps -aef | grep k3b | grep -v grep|grep -v vim`<br> /* <br><br>some logic placed which will lead to results<br>
*/<br>if test $op != "";then<br>then<br>    COLOR=green<br>  else<br>    COLOR=red<br>  fi<br>  $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`<br>  ${MSG}<br>  "<br>done<br>exit 0<br>------------------<br>
logs alos do not show anything except bb-hosts enties..<br>help me..abt how can i get correct status for all clients and serverm using server side xternal script<br></pre><br>Pankaj V. Dorlikar<br>