Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-7734

Alerts: Create REST API Endpoint for Alert History

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Create REST API endpoints for retrieving alert history. This includes the following work:

      • Filters for services, hosts, alert names, timestamps, states, components
      • Exposure of alert data (defintiion id/name, alert state, component, services, etc)
      http://localhost:8080/api/v1/clusters/c1/alert_history?(AlertHistory/definition_name=percent_datanode)&AlertHistory/state=OK|AlertHistory/state=WARNING&fields=*&from=start&page_size=10
      
      {
        "href" : "http://localhost:8080/api/v1/clusters/c1/alert_history?(AlertHistory/definition_name=percent_datanode)&AlertHistory/state=OK|AlertHistory/state=WARNING&fields=*&from=start&page_size=10",
        "itemTotal" : "2",
        "items" : [
          {
            "href" : "http://localhost:8080/api/v1/clusters/c1/alert_history/8",
            "AlertHistory" : {
              "cluster_name" : "c1",
              "component_name" : null,
              "definition_id" : 6,
              "definition_name" : "percent_datanode",
              "host_name" : null,
              "id" : 8,
              "instance" : null,
              "label" : "Percent DataNodes Live",
              "service_name" : "HDFS",
              "state" : "OK",
              "text" : "OK: total: <1>, affected:  <0>",
              "timestamp" : 1412720298046
            }
          },
      ...
      }
      

        Attachments

          Activity

            People

            • Assignee:
              jonathan.hurley Jonathan Hurley
              Reporter:
              jonathan.hurley Jonathan Hurley
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: