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