[Xymon] xymon client message STATUSLIFETIME?

Jeremy Laidman jlaidman at rebel-it.com.au
Wed Apr 15 06:05:56 CEST 2015


I'll assume you've looked at the "dialup" keyword, which will make client
(eg cpu and disk) statuses clear instead of purple.

The default lifetime (30 minutes) is defined by the STATUSLIFETIME variable
defined in xymonserver.cfg on the server.  To override this value for
network checks, you can specify "--validity=N" on the command-line used to
run xymonnet.

Neither of these are likely to help you.  The client messages are turned
into status messages by xymond_client.  All instances of code in
xymond_client that sends a status message do so without a validity
specified.

One thing you could do is to write a script that reads and refreshes the
status for all relevant entries for the server in question, run every 25
minutes.  For example:

$XYMON $XYMSRV 'xymondboard host=host.example.com test=^(disk|memory|cpu)$
fields=hostname,testname,color,clntstamp'

This gives you the client timestamp (in epoch seconds) - when the client
message was received.  You can subtract this from the current time (eg from
"date +%s") to get the age of the client message.  If it's less than 25
minutes, you have a status message that needs to be "refreshed".  What you
then would do is to query (with: $XYMON $XYMSRV "xymondlog
host.example.com.cpu") and replay the status message (including whatever
colour it had) with "+LIFETIME" added.

Also, you could label all such hosts with a special keyword like how
xymonnet uses "dialup", perhaps "daily".  Then use "xymongrep daily" to get
the hostnames you want to refresh.

Cheers
Jeremy


On 14 April 2015 at 01:09, Werner Maier <werner at maiers.de> wrote:

> Hi,
>
> I have the following problem:
>
> I want to monitor the client data of a machine that is only up
> once a day.
>
> the machine gets waked up w/ wakeonlan, takes an rsnapshost of other
> servers, and shuts down again. (no need to be up 24/7 with 8 2 TB HDDs,
> raidcontroller)...
>
> I know about the normal xymon status+LIFETIME protocol.
> but I don't see where or how to configure that client to send
> a LIFETIME with the "xymonclient.sh" - it uses the
> "client" protocol.
>
> how do I set the validity for these tests to 24h+ ?
> (1600 minutes should be ok).
>
> thanks in advance.
>
> Werner
> --
> Dipl.-Ing. Univ. Werner Maier
> http://www.maiers.de/
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150415/f190b014/attachment.html>


More information about the Xymon mailing list