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