1

I use zabbix to monitor a log file, and I want zabbix to send a mail every time a new line coming in the log file. I define the trigger:

{xxx:log[/tmp/log,"error"].str(error)}=1

I find that zabbix does the 'action' (send a mail) only when the trigger's status changes.

So, when the first line comes into the log file, the trigger becomes PROBLEM. And then the trigger's status keeps PROBLEM, so the following lines will not sending a mail.

There is a way to change trigger's status into OK, if there is no more log in 60 seconds:

{xxx:log[/tmp/log,"error"].str(error)}=1 && {xxx:log[/tmp/log,"error"].nodata(60)}=0

But I want zabbix to send mail for every line in log file.

I thought this is a basic requirement of log monitoring.

Any way to do this?

Thanks in advance

3

Using your original expression {xxx:log[/tmp/log,"error"].str(error)}=1, mark the "Multiple PROBLEM event generation" checkbox in the trigger properties.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.