Trigger doesn't work in my client-local.cfg
Samuel Cai
Samuel.Cai at ehealth-china.com
Fri Jul 18 12:04:23 CEST 2008
Hi,
We configured Hobbit to monitor a server.log file on client, one
application keeps outputting a lot of data into it.
Now we found a problem: a string (OutOfMemoryError) we want to check did
exist in log, but wasn't reported to server, we found the root reason is
Hobbit client only sends partial data to server (since data added a lot
during every 5 mins).
According to Hobbit's man page, this can be fixed by adding trigger:
The trigger PATTERN line (optional) is used only when there is more data
in the log than the maximum size set in the "log:FILENAME:SIZE" line.
The "trigger" pattern is then used to find particularly interesting
lines in the logfile - these will always be sent to the Hobbit server.
After picking out the "trigger" lines, any remaining space up to the
maximum size is filled in with the most recent entries from the logfile.
"PATTERN" is a regular expression.
For example in our client-local.cfg:
[our server]
log: /var/log/server.log:10240
trigger Error
But it didn't work! I tried replacing "trigger Error" with "trigger
%Error", Hobbit client still only reported partial data.
I'm thinking two possible reasons:
1. The regular expression I wrote is wrong.
2. Hobbit client only checks last xxxxx bytes of monitoring file.
Does anyone have met same issues? Really appreciate if you could share
your thoughts and experiences.
Thanks,
Samuel Cai
More information about the Xymon
mailing list