Ad Widget

Collapse

Only Alert After Second Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mpalermo73
    Junior Member
    • Jul 2015
    • 3

    #1

    Only Alert After Second Error

    Hey!

    I've seen a few examples similar to what I need to do via Google, but, I still need a bit of help...

    The existing trigger is:

    Code:
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(0)}
    <
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount].last(0)}
    But we don't want to send the notification unless it's true TWICE (as in two time periods in a row).

    I did find examples suggesting using
    Code:
    {TRIGGER.VALUE}=0(The_Long_Above_Test)
    
    |
    
    {TRIGGER.VALUE}=1(The_Long_Above_Test)

    And I can get that very long expression to pass the constructor. However, I do not think this is really what I'm looking to do.

    Can someone offer a bit of help?


    M.
  • akbar415
    Senior Member
    • May 2015
    • 119

    #2
    Originally posted by mpalermo73
    Hey!

    I've seen a few examples similar to what I need to do via Google, but, I still need a bit of help...

    The existing trigger is:

    Code:
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(0)}
    <
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount].last(0)}
    But we don't want to send the notification unless it's true TWICE (as in two time periods in a row).

    I did find examples suggesting using
    Code:
    {TRIGGER.VALUE}=0(The_Long_Above_Test)
    
    |
    
    {TRIGGER.VALUE}=1(The_Long_Above_Test)

    And I can get that very long expression to pass the constructor. However, I do not think this is really what I'm looking to do.

    Can someone offer a bit of help?


    M.

    Code:
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(0)}
    <
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=MarkSweepCompact",CollectionCount].last(0)}
    I don't undestand this trigger. For a trigger work's, you need to compare data collected with what you want.

    Code:
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(0)[COLOR="black"][B][I]=123456[/I][/B][/COLOR]}
    Anyway, you can use this

    Code:
    {Template JMX Account Services:jmx["java.lang:type=GarbageCollector,name=Copy",CollectionCount].last(#2)="somenthing you want"}

    last(#2) = Check the two latest values

    Comment

    • ArtemK
      Senior Member
      • May 2013
      • 232

      #3
      Originally posted by akbar415
      last(#2) = Check the two latest values
      That's not true, see docs
      Code:
      last() is always equal to last(#1)
      last(#3) - third most recent value (not three latest values)
      {TRIGGER.VALUE}=0 & .. {TRIGGER.VALUE}=1 & ... is hysteresis, it allows to define different conditions for problem and recovery state.

      What you probably want is something like this:
      Code:
      ({host:item_key1.last(#1)} < {host:item_key2.last(#1)})
      &
      ({host:item_key1.last(#2)} < {host:item_key2.last(#2)})

      Comment

      • akbar415
        Senior Member
        • May 2015
        • 119

        #4
        Originally posted by ArtemK
        That's not true, see docs
        Code:
        last() is always equal to last(#1)
        last(#3) - third most recent value (not three latest values)
        {TRIGGER.VALUE}=0 & .. {TRIGGER.VALUE}=1 & ... is hysteresis, it allows to define different conditions for problem and recovery state.

        What you probably want is something like this:
        Code:
        ({host:item_key1.last(#1)} < {host:item_key2.last(#1)})
        &
        ({host:item_key1.last(#2)} < {host:item_key2.last(#2)})
        Sorry, my bad.

        I thought that was the same logic as count(#10,..)

        Comment

        Working...