PDA

View Full Version : Log file monitor and trigger: How?


bob.burgess
03-04-2007, 16:52
I would like to monitor an Oracle alert log file and trigger an event when a certain string appears. I'd also like to put lines from the log in the alert message.
I found steps in the docs to add an item to watch the log file, which I did, but nothing shows up in its History. I started to create a trigger on this item, but I'm not sure what to use for the expression.

Has anyone done this? I'm starting out with Zabbix, and I'd really appreciate any guidance anyone can offer.

(My apologies if this information appears elsewhere.)

Thanks,
--Bob

flashg0rd0n
03-07-2007, 14:20
Hi Bob,

Did you make any progress with this? I am quite new to zabbix and am faced with a similar dilemma.

I would like to have the contents of the Oracle Alert.log file emailed to me if it contains any ORA-* error messages.

Any tips on expressions needed to set up triggers for this to be done would be much appreciated if you could pass them on.

bob.burgess
03-07-2007, 15:08
I actually never got much of anything working properly in Zabbix. We abandoned it and went with one of the smaller commercial monitoring systems. I wrote a script which runs periodically through cron to watch for errors in the alert log, compile them into a single line, and write them (and other info) to a key/value text file. If this would help you, let me know and I can send it to you.

Bob

Alexei
03-07-2007, 15:49
ZABBIX Agents support filtering of log messages on agent side:

log[log_file,filter]

log_file - full path to a file
filter - posix-style regular expression

For example, log["/var/log/application/warnings.log","ERROR"]

dagof
04-07-2007, 19:30
Hi Alexei,

Once the item is getting data from the log, how do i set up a trigger based upon this? The only thing I see is the last matched line.

Thanks in advance.