[hobbit] Custom script shows purple

TJ Yang tjyang2001 at gmail.com
Tue Apr 27 23:42:55 CEST 2010


On Tue, Apr 27, 2010 at 4:13 PM, Scott Ryan <scottlryan at gmail.com> wrote:
> The wiki -
>
> http://en.wikibooks.org/wiki/System_Monitoring_with_Xymon/Other_Docs/FAQ#My_test_only_runs_every_hour._How_do_I_get_it_to_not_go_purple_after_30_minutes_.3F
>
I updated this URL with more detail information.

> Then the man page - you need to run
>
> # bb status lifetime
>
> On Tue, Apr 27, 2010 at 9:57 PM, David Morgan <captkras at gmail.com> wrote:
>> Yes, the script is being executed.  I think it is the server not
>> knowing that it only runs every four hours.  How can I set the default
>> for this check to be 4 hours (and leave the rest at 30 mins)?  Or can
>> you do that?
>>
>> Dave
>>
>> On Tue, Apr 27, 2010 at 4:41 PM, Scott Ryan <scottlryan at gmail.com> wrote:
>>> Is the script being executed? Assuming it is, have you configured the
>>> server to only expect the check to be run every 4 hours? If not it
>>> will go purple after 30 minutes every time as that is the default
>>> check timeout.
>>>
>>> If the script is not running at all, what do the xymon logs say? If it
>>> has an issue running the script you should see it in the logs. You
>>> could check that the xymon user has the rights to execute the script.
>>>
>>> Thanks
>>>
>>> On Tue, Apr 27, 2010 at 8:55 PM, David Morgan <captkras at gmail.com> wrote:
>>>> 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: captkras at gmail.com
>>>>
>>>> "When the Winds of Change Blow Hard Enough,
>>>> the Most trivial of things can turn into deadly projectiles"
>>>>
>>>> To unsubscribe from the hobbit list, send an e-mail to
>>>> hobbit-unsubscribe at hswn.dk
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Scott Ryan
>>> http://bonoboslr.wordpress.com/
>>>
>>> To unsubscribe from the hobbit list, send an e-mail to
>>> hobbit-unsubscribe at hswn.dk
>>>
>>>
>>>
>>
>>
>>
>> --
>> David S. Morgan CISSP, CCNP
>> aka: captkras at gmail.com
>>
>> "When the Winds of Change Blow Hard Enough,
>> the Most trivial of things can turn into deadly projectiles"
>>
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
>>
>>
>>
>
>
>
> --
> Scott Ryan
> http://bonoboslr.wordpress.com/
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>



-- 
T.J. Yang



More information about the Xymon mailing list