Ad Widget

Collapse

Trigger not resetting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maheshme973
    Junior Member
    • Jul 2011
    • 9

    #1

    Trigger not resetting

    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
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    Hi,
    See if this, or something like it, works:

    ({TRIGGER.VALUE}=0 & {t_JBOSS_ACE_trapper:log[<logfile>,"com.mysql.jdbc.CommunicationsExceptio n: |java.lang.OutOfMemoryError:"].count(60,com.mysql.jdbc.CommunicationsException } > 1) | ({TRIGGER.VALUE}=1 & {t_JBOSS_ACE_trapper:log[<logfile>,"com.mysql.jdbc.CommunicationsExceptio n: |java.lang.OutOfMemoryError:"].nodata(60)}=0)

    That is:

    -If trigger is normal and an error message is found then change state
    - If trigger is in problem state and no data has been received for 60 seconds then change state

    By my reckoning that should allow your trigger to return to an OK state.


    Regards,
    David

    Comment

    • maheshme973
      Junior Member
      • Jul 2011
      • 9

      #3
      Thanks David. I will try that. I'll keep you posted.

      Any idea how or when triggers get re-calculated? In your solution too, when will a nodata() get calculated? What's the event? Or is it that, contrary to my understanding, there is a background thread that keeps calculating triggers every so often (in which case my original trigger should have worked)?

      thanks,
      mahesh

      Comment

      • maheshme973
        Junior Member
        • Jul 2011
        • 9

        #4
        David, your suggestion worked and it meets my needs. Thanks!

        But I am still peeved that the "icmpping" item did not force a re-calculation of the trigger expression every 30 seconds.

        thanks,
        mahesh

        Comment

        Working...