ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <jhur...@hortonworks.com>
Subject Review Request 27884: Alerts: Provide Grouped Summary Structure On Alerts Endpoint
Date Tue, 11 Nov 2014 21:39:24 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27884/
-----------------------------------------------------------

Review request for Ambari, Nate Cole, Oleg Nechiporenko, Srimanth Gunturi, and Tom Beerbower.


Bugs: AMBARI-8289
    https://issues.apache.org/jira/browse/AMBARI-8289


Repository: ambari


Description
-------

Add ability to get summary info about alerts grouped by {{alert_definition_name}}.

{code}
http://localhost:8080/api/v1/clusters/c1/alerts?format=groupedSummary
{
  "alerts_summary_grouped" : [
    {
      "definition_id" : 1,
      "definition_name" : "datanode_process",
      "summary" : {
        "CRITICAL": {
          "count": 1,
          "original_timestamp": 1415372992337
        },
        "OK": {
          "count": 1,
          "original_timestamp": 1415372992337
        },
        "UNKNOWN": {
          "count": 0,
          "original_timestamp": 0
        },
       "WARN": {
         "count": 0,
         "original_timestamp": 0
        }
      }
    },
    {
      "definition_id" : 2,
      "definition_name" : "namenode_process",
      "summary" : {
        "CRITICAL": {
          "count": 1,
          "original_timestamp": 1415372992337
        },
        "OK": {
          "count": 1,
          "original_timestamp": 1415372992337
        },
        "UNKNOWN": {
          "count": 0,
          "original_timestamp": 0
        },
       "WARN": {
         "count": 0,
         "original_timestamp": 0
        }
      }
    }    
  ]
}
{code}


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/query/render/AlertSummaryGroupedRenderer.java
PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/api/query/render/AlertSummaryRenderer.java
afe9798 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertResourceDefinition.java
18f206e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertResourceProvider.java
3430f8d 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
2bac86a 

Diff: https://reviews.apache.org/r/27884/diff/


Testing
-------

New test added to cover the new renderer.


Thanks,

Jonathan Hurley


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message