Skip to content

Commit

Permalink
HWKALERTS-240 Add Metrics Group Trigger support in the metrics alerter
Browse files Browse the repository at this point in the history
MGT support allows users to define a group trigger whose member triggers are
managed automatically by the alerter.
  • Loading branch information
jshaughn committed Mar 27, 2017
1 parent 65cace4 commit 87d5c41
Show file tree
Hide file tree
Showing 7 changed files with 1,194 additions and 4 deletions.
12 changes: 12 additions & 0 deletions alerting/alerter-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,18 @@
<version>1.5</version>
</dependency>

<!-- documentation -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<scope>provided</scope>
</dependency>

<!-- Tests -->
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,19 @@ public class ConditionManager {
private static final String TAG_EXTERNAL_CONDITION_NAME = "HawkularMetrics";
private static final String TAG_EXTERNAL_CONDITION_VALUE = "MetricsCondition";

private static final Integer THREAD_POOL_SIZE = 20;
private static final Integer THREAD_POOL_SIZE;
private static final String THREAD_POOL_SIZE_DEFAULT = "20";
private static final String THREAD_POOL_SIZE_PROPERTY = "hawkular-metrics.alerter.condition-pool-size";

static {
int v;
try {
v = Integer.valueOf(System.getProperty(THREAD_POOL_SIZE_PROPERTY, THREAD_POOL_SIZE_DEFAULT));
} catch (Exception e) {
v = Integer.valueOf(THREAD_POOL_SIZE_DEFAULT);
}
THREAD_POOL_SIZE = v;
}

ScheduledThreadPoolExecutor expressionExecutor;
Map<ExternalCondition, ScheduledFuture<?>> expressionFutures = new HashMap<>();
Expand Down

0 comments on commit 87d5c41

Please sign in to comment.