Bug 698320 - Dampening on consecutive count does not work for equals comparision
Summary: Dampening on consecutive count does not work for equals comparision
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Alerts
Version: 4.0.0.Beta2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-20 15:55 UTC by Heiko W. Rupp
Modified: 2018-11-14 13:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:20:01 UTC
Embargoed:


Attachments (Terms of Use)
Screenshot of the alert history. (82.43 KB, image/png)
2011-04-20 15:59 UTC, Heiko W. Rupp
no flags Details
Plugin that generates the pattern mentioned in the case (6.26 KB, application/java-archive)
2011-04-20 16:02 UTC, Heiko W. Rupp
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1025491 0 unspecified CLOSED Alerts get triggered even when dampening rules have not been satisfied due to missing InactiveAlertConditionMessage 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 51814 0 None None None Never

Internal Links: 1025491

Description Heiko W. Rupp 2011-04-20 15:55:15 UTC
Have e.g. a metric sender that is sending 

1,0,0,0,0,0,1,0,0,0,... (that is 1, five zeros, 1 , five zeros, ... )

and put an alert on condition "value == 0" for three consecutive times.

You will see that this actually fires at index 4 (the third zero in above series, starting to count at 1 ) and at index 8, which is the first 0 after the 2nd 1.

This is wrong, as the second '1' breaks the sequence of 3 consecutive 0s.

Now set up a 2nd alert, where the condition is slightly altered to say "value < 0.1". Now the alert correctly fires at index 4 and 10 - each time when three zeroes have been detected.

The difference between == and < is in org.rhq.enterprise.server.alert.engine.model.AlertConditionOperator :

    LESS_THAN(Type.STATEFUL), // 
    EQUALS(Type.STATELESS), // 

Where Type.STATELESS prohibits sending a "start counting" message in org.rhq.enterprise.server.alert.engine.internal.AbstractConditionCache#processCacheElements

Comment 1 Charles Crouch 2011-04-20 15:58:30 UTC
Ok so we have a workaround for the current release. But this should be fixed in master

Comment 2 Heiko W. Rupp 2011-04-20 15:59:58 UTC
Created attachment 493531 [details]
Screenshot of the alert history.

Screenshot of fired alerts.

the 1 are sent at 
XX Wed Apr 20 17:28:06 CEST 2011 -- 1
XX Wed Apr 20 17:34:06 CEST 2011 -- 1
XX Wed Apr 20 17:40:06 CEST 2011 -- 1
XX Wed Apr 20 17:46:06 CEST 2011 -- 1
XX Wed Apr 20 17:52:06 CEST 2011 -- 1
XX Wed Apr 20 17:58:06 CEST 2011 -- 1

metrics are sent each minute , so the alert has to trigger 3 minutes after the 1 is sent. This happens for the lt ('<') case correctly.

Comment 3 Heiko W. Rupp 2011-04-20 16:02:21 UTC
Created attachment 493532 [details]
Plugin that generates the pattern mentioned in the case

Comment 4 Heiko W. Rupp 2011-04-27 13:26:39 UTC
Changed '=' to stateful in 1bba9e4a61e82160afc7924e167f3da56187cabb

Comment 5 Heiko W. Rupp 2011-04-28 08:41:54 UTC
Note that you can use the new pattern-plugin to generate sequences of 1s and 0s 
of arbitrary lengths to test this.

Comment 6 Mike Foley 2011-06-21 19:45:57 UTC
verified using the attached 'pattern' plug-in.  set an alert, as described, with dampening.  the alert fired, and then was correctly dampened.

Comment 7 Heiko W. Rupp 2013-09-02 07:20:01 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.


Note You need to log in before you can comment on or make changes to this bug.