ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-8623) Alert Host Count Summary Exposed Via Cluster Endpoint
Date Tue, 09 Dec 2014 22:16:13 GMT
Jonathan Hurley created AMBARI-8623:
---------------------------------------

             Summary: Alert Host Count Summary Exposed Via Cluster Endpoint
                 Key: AMBARI-8623
                 URL: https://issues.apache.org/jira/browse/AMBARI-8623
             Project: Ambari
          Issue Type: Bug
          Components: alerts, ambari-server
    Affects Versions: 2.0.0
            Reporter: Jonathan Hurley
            Assignee: Jonathan Hurley
             Fix For: 2.0.0


In Ambari-1.7.0 the cluster endpoint used to have a summary of host-counts by severity. We
need such a field in Ambari-2.0.0.
{code}
alerts: {
 summary: {
  CRITICAL: 1,
  OK: 4,
  PASSIVE: 0,
  WARNING: 0
 }
}
{code}

The alerts_summary structure currently returned by the 2.0.0 API are the summary counts of
alerts in the system, not those of the hosts. There are alerts that don't have a host (such
as aggregate alerts). 

In order to expose the host alert count, there are two ways to do this:
1) Add a new field to the cluster endpoint; something like {{alerts_host_summary}}
{noformat}
http://localhost:8080/api/v1/clusters/c1?fields=alerts_host_summary
{
  "href" : "http://localhost:8080/api/v1/clusters/c1?fields=alerts_host_summary",
  "Clusters" : {
    "cluster_name" : "c1",
    "version" : "HDP-2.2"
  },
  "alerts_host_summary" : {
    "CRITICAL" : 1,
    "OK" : 41,
    "UNKNOWN" : 0,
    "WARNING" : 0
  }
}
{noformat}

2) Provide a new formatter to display the alerts formatted by host:
{noformat}
http://localhost:8080/api/v1/clusters/c1/alerts?format=hostSummary
{
  "href" : "http://localhost:8080/api/v1/clusters/c1/alerts?format=hostSummary",
  "alerts_summary" : {
    "CRITICAL" : {
      "count" : 1,
      "original_timestamp" : 1418150735812
    },
    "OK" : {
      "count" : 41,
      "original_timestamp" : 1418151145325
    },
    "UNKNOWN" : {
      "count" : 0,
      "original_timestamp" : 0
    },
    "WARNING" : {
      "count" : 0,
      "original_timestamp" : 0
    }
  }
}
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message