Ad Widget

Collapse

how to trigger only when problem for 30 minutes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roby
    Junior Member
    • Feb 2013
    • 13

    #1

    how to trigger only when problem for 30 minutes

    Hi!
    I would like to monitor Oracle locks with ZABBIX + DBFORBIX.
    My current setup is working properly and is already receiving data, when there is a lock, Latest data shows something like this when there ARE locks:
    ......
    155 Holder: TX Exclusive No Lock 10084 262163 3156449 SCHEMA.OBJECT
    155 Holder: TX Exclusive No Lock 10084 262163 3156449 SCHEMA.OBJECT
    155 Holder: TX Exclusive No Lock 10084 262163 3156449 SCHEMA.OBJECT
    ......

    when there ARE NO objects locked, then:
    ......
    none
    none
    none
    none
    ......

    new line is added with approx 1 minute interval here.

    Trigger looks like this:
    {HOST.SIDBforBIX.Oracle.locks.str(none)}=0

    Which will change status of trigger as soon as the data received by item is something else than text "none".
    It works, BUT fires up way too often because it is a legit operation to lock objects for time of writing data in Oracle DB tables, but if a lock stays for more than 30 minutes, then it is when one should start looking at it.

    What do you suggest for this?
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    Take a look at the "count" function here: https://www.zabbix.com/documentation...gers/functions


    Based on that function, I believe your trigger would look something like this:
    {HOST.DBforBIX.Oracle.locks.count(1800,"none","eq" )}=0

    It simply means that the trigger should go off if the text "none" shows up 0 times in the last 30 minutes (1800 seconds).

    Comment

    • roby
      Junior Member
      • Feb 2013
      • 13

      #3
      thank you! just the thing I was after!

      Comment

      Working...