I am trying to look for "java.lang.OutOfMemoryError:" errors in my JBoss log file. If I encounter even one such error, I would like to raise an alert in the dashboard (and probably restart the server automatically).
For this, I created a zabbix trapper item as follows:
log(<log file>, "com.mysql.jdbc.CommunicationsException:|java.lang .OutOfMemoryError:"]
(Note: The item also looks for "com.mysql.jdbc.CommunicationsException:" which will be used in a different trigger)
The trigger I defined was:
{t_JBOSS_ACE_trapper:log[<logfile>,"com.mysql.jdbc.CommunicationsException: |java.lang.OutOfMemoryError:"].count(60,com.mysql.jdbc.CommunicationsException
} > 1
The trigger seemed to work fine. But it never reset itself. After much thought, I assumed this was because after the trigger was flagged, there was no incoming value on the item (no out of memory errors in the log file) and therefore the trigger never got recalculated.
So, I then changed the trigger and added a ping condition to it as follows:
{t_JBOSS_ACE_trapper:log[<logfile>,"com.mysql.jdbc.CommunicationsException: |java.lang.OutOfMemoryError:"].count(60,com.mysql.jdbc.CommunicationsException
} > 1 & {t_JBOSS_ACE_trapper:icmpping.last(0)} = 1
Since the ping item is recorded every 60 seconds, I expected the above trigger to be calculated every 60 seconds. So, even if there are no string matches reported by the "log" item, I thought each time the ping came back, it would recalculate the trigger and reset the alarm on the dashboard if there were no errors in the logfile during the last minute.
This doesn't seem to work either. The trigger sets off an alert in the dashboard and the alert remains there permanently (I haven't waited long enough to find out how long it stays there).
For the sake of completeness: I have also created an action to send an email when this trigger is set.
Any ideas why the trigger is not reset? Anything I am doing wrong?
Thanks,
mahesh
For this, I created a zabbix trapper item as follows:
log(<log file>, "com.mysql.jdbc.CommunicationsException:|java.lang .OutOfMemoryError:"]
(Note: The item also looks for "com.mysql.jdbc.CommunicationsException:" which will be used in a different trigger)
The trigger I defined was:
{t_JBOSS_ACE_trapper:log[<logfile>,"com.mysql.jdbc.CommunicationsException: |java.lang.OutOfMemoryError:"].count(60,com.mysql.jdbc.CommunicationsException
} > 1The trigger seemed to work fine. But it never reset itself. After much thought, I assumed this was because after the trigger was flagged, there was no incoming value on the item (no out of memory errors in the log file) and therefore the trigger never got recalculated.
So, I then changed the trigger and added a ping condition to it as follows:
{t_JBOSS_ACE_trapper:log[<logfile>,"com.mysql.jdbc.CommunicationsException: |java.lang.OutOfMemoryError:"].count(60,com.mysql.jdbc.CommunicationsException
} > 1 & {t_JBOSS_ACE_trapper:icmpping.last(0)} = 1Since the ping item is recorded every 60 seconds, I expected the above trigger to be calculated every 60 seconds. So, even if there are no string matches reported by the "log" item, I thought each time the ping came back, it would recalculate the trigger and reset the alarm on the dashboard if there were no errors in the logfile during the last minute.
This doesn't seem to work either. The trigger sets off an alert in the dashboard and the alert remains there permanently (I haven't waited long enough to find out how long it stays there).
For the sake of completeness: I have also created an action to send an email when this trigger is set.
Any ideas why the trigger is not reset? Anything I am doing wrong?
Thanks,
mahesh
Comment