Xymon Mailing List Archive search

Custom script shows purple

list David Morgan
Tue, 27 Apr 2010 15:55:36 -0400
Message-Id: <user-e95b6df6b7a0@xymon.invalid>

We have a custom client side script that we wrote to test ldap
connectivity  (See below)

% cat getent.sh

#!/bin/sh

   COLUMN=ldap-con      # Does the server have an LDAP conection
   COLOR=green          # By default, everything is OK
   MSG="LDAP Connectivity Check"

   TESTVAL=`/usr/bin/getent group admins | wc -l`

   # Do whatever you need to test for something
   # As an example, go red if /tmp/badstuff exists.
   if [ $TESTVAL -eq 0 ]
   then
      COLOR=red
      MSG="${MSG}

      LDAP Configureation and Connectivity is BORKED UP
      "
   else
      MSG="${MSG}

      LDAP Configureation and Connectivity is OK
      "
   fi

   # Tell Hobbit about it
   $BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`

   ${MSG}
   "

   exit 0


And the following is our clientlocal.sh portion for this script:

# LDAP Check - This command makes sure that this box is connected to
the MGS LDAP Server
[ldap-con]
        ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
        CMD $HOBBITCLIENTHOME/ext/getent.sh
        LOGFILE $HOBBITCLIENTHOME/logs/ldap.log
        INTERVAL 4h

As can be seen, we have it running every 4 hours.  The status check
should be green, however, it goes to purple.  Is there a way (and
where/how) to change the default timeout for this, as I think the 4
hour time is making it puke.

Both these scripts are on the client side.

-- 
David S. Morgan CISSP, CCNP
aka: user-4691629dd582@xymon.invalid

"When the Winds of Change Blow Hard Enough,
the Most trivial of things can turn into deadly projectiles"