[Xymon] Xymon Log Retrieval

Jeremy Laidman jlaidman at rebel-it.com.au
Tue Apr 23 02:19:10 CEST 2013


On 22 April 2013 17:15, Jeremy Laidman <jlaidman at rebel-it.com.au> wrote:

> On 22 April 2013 14:54, Jeremy Laidman <jlaidman at rebel-it.com.au> wrote:
>
>> config files on the Xymon server.  For example, something like this in
>> client-local.cfg:
>>
>> log:`if [ -f /tmp/pw.rep ]; then if grep '^[0-9]' /tmp/pw.rep | tail -n
>> +3 | grep ^ >/dev/null; then cp /dev/null /tmp/pw.rep; fi; diff /tmp/pw.old
>> /etc/passwd >> /tmp/pw.rep; else touch /tmp/pw.rep; fi; cp /etc/passwd
>> /tmp/pw.old; echo /tmp/pw.rep`:2048
>>
>
Updated to work with non-GNU tail (eg on Solaris):

log:`if [ -f /tmp/pw.rep ]; then if grep '^[0-9]' /tmp/pw.rep | tail +3 |
grep ^ >/dev/null; then cp /dev/null /tmp/pw.rep; fi; diff /tmp/pw.old
/etc/passwd >> /tmp/pw.rep; else touch /tmp/pw.rep; fi; cp /etc/passwd
/tmp/pw.old; echo /tmp/pw.rep`:2048

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130423/aa1ee916/attachment.html>


More information about the Xymon mailing list