Xymon Mailing List Archive search

problem with ext script

list Jeremy Laidman
Mon, 8 Jul 2013 22:52:05 +1000
Message-Id: <CAAnki7C76ujWdu99=r3=UuX+KnBYwrwj=opO1244i=user-ed05ce6a7cbb@xymon.invalid>

On Monday, 8 July 2013, Root, Paul T wrote:
 Why not just send the output to the server with the xymon command?
Yeah, I like this idea.  The command can be sent as a supplementary client
command like so:

*/5 * * * * ~xymon/client/bin/xymoncmd sh -c '{ echo client/dmraid
$MACHINE; echo "[dmraid]"; /sbin/dmraid -r; } | $XYMON $XYMSRV @'

Then a script on the Xymon server can pull the dmraid output from the
client data like so:

#!/bin/sh
DMRAID=`$XYMON $XYMSRV "clientlog name.of.host section=dmraid"`

This strategy means that all of the heavy lifting is done on the Xymon
server, and the client needs only a fairly simple one-liner in a crontab.
 Improvements to the script need only be applied to the Xymon server,
instead of having to perform updates to (for some of us) dozens or more
clients.

J