[Xymon] xymon-rclient.sh

Alexander Bech alex at bakarasse.de
Sun Sep 14 14:55:59 CEST 2014


Am 10.09.2014 03:55, schrieb Jeremy Laidman:
>
> What's missing is the state processing for "log" files (it sends the 
> whole log every time), and handling of "trigger" and "ignore".

Hi,

here is a version of xymon-rclient.sh with support of logfile monitoring.

The added function do_host_logs() does following:
- read local preserved logfetch.cfg files for each remote host
- on next and each run tail 100 loglines from logfiles on monitored host 
over remote connection
- on each run emulates syslog on rclient-side for each remote logfile 
with "grep -Fvx newdata prevdata >> logfile"
- generate a modified logfetch.cfg2 file for local logfetch
- run local logfetch and report [msgs:...] data

Based on version 0.5.
Produces not much traffic and periodically rotates local emulated logfiles.
Works like the original xymonclient and handling of "trigger" and "ignore".

Other modification: assign class name which the rclient reports.

Maybe it's possible to integrate the code into xymon-rclient 0.6?


Greetings,
Alex





-------------- next part --------------
A non-text attachment was scrubbed...
Name: xymon-rclient.sh
Type: application/x-shellscript
Size: 21623 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140914/b05a6367/attachment.bin>


More information about the Xymon mailing list