Hi,
I've been setting up an action to send me an e-mail whenever a logfile contains "ERROR" by first setting up a logfile item, then a trigger on that
and finally an action e-mailing me with the message:
It all works great except whenever it triggers it reports the line of the logfile that happened just before on what the trigger triggered on rather than the actual error message.
Any idea of what macro I should use in place of {ITEM.VALUE} to get the error message whenever the trigger triggers?
I've been setting up an action to send me an e-mail whenever a logfile contains "ERROR" by first setting up a logfile item, then a trigger on that
Code:
logfile ({hostname:log[/var/log/logfile.log,,"UTF-8",25].regexp("ERROR")}=0 & {hostname:log[/var/log/logfile.log,,"UTF-8",25].nodata(180)}=0)
Code:
{STATUS}
Monitoring node: {NODE.ID}
Environment: {PROFILE.LOCATION}
Host: {HOSTNAME}
Severity: {TRIGGER.SEVERITY}
Issue: {TRIGGER.NAME}
Value: {ITEM.VALUE}
Started: {EVENT.TIME}
Additional information:
{TRIGGER.COMMENT}
Any idea of what macro I should use in place of {ITEM.VALUE} to get the error message whenever the trigger triggers?
Comment