-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45561/
-----------------------------------------------------------
(Updated March 31, 2016, 4:22 p.m.)
Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, and
Robert Nettleton.
Bugs: AMBARI-15656
https://issues.apache.org/jira/browse/AMBARI-15656
Repository: ambari
Description
-------
Alert repeat tolerance values should be captured and exposed via the API. The
rules for capturing the occurrences of an alert are:
- Alert instances always start at 1
- Alerts with an {{OK}} state always reset the counter
- When transitioning from {{OK}} to non-{{OK}}, the counter is reset
- When transitioning within non-{{OK}} states (such as back and forth between
{{WARNING}} and {{CRITICAL}}, the counter is merely incremented.
{code}
GET api/v1/clusters/c1/alerts/1
{
"href": "http://localhost:8080/api/v1/clusters/c1/alerts/1",
"Alert": {
"cluster_name": "c1",
...
"repeat_tolerance": 1,
"repeat_tolerance_remaining": 0,
"occurrences": 8,
....
{code}
- {{OK}} alert instances will *always* have a value of {{0}} for
{{repeat_tolerance_remaining}} since they do not honor repeat tolerance. An
{{OK}} alert is considered to be correct always.
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java
dc071e9
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java
a3befa6
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
604b00e
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
a73a526
ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 79f41e3
ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 90fc375
ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql d1880bc
ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql dd1fe5f
ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
e7e1997
ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql aa8a4d9
ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 504c910
ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java
0d893af
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
f66f21b
Diff: https://reviews.apache.org/r/45561/diff/
Testing
-------
mvn clean test
Thanks,
Jonathan Hurley