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

Alerts: Expose Alert Notices via REST APIs

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • ambari-server
    • None

    Description

      For every outbound notification, Ambari currently keeps track of the dispatch state (PENDING, DELIVERED, FAILURE). This data needs to be exposed via the REST APIs so that it can be queried.

      http://localhost:8080/api/v1/clusters/c1/alert_notices?fields=*
      http://localhost:8080/api/v1/clusters/c1/alert_notices?AlertNotice/notification_state=DELIVERED&fields=*
      
      {
        "href" : "http://localhost:8080/api/v1/clusters/c1/alert_notices?fields=*",
        "items" : [
          {
            "href" : "http://localhost:8080/api/v1/clusters/c1/alert_notices/1",
            "AlertNotice" : {
              "cluster_name" : "c1",
              "history_id" : 1,
              "id" : 1,
              "notification_state" : "DELIVERED",
              "service_name" : "HDFS",
              "target_id" : 1,
              "target_name" : "Administrators",
              "uuid" : "106ecdb4-0970-4c50-22d3-706d53571321"
            }
          },
          {
            "href" : "http://localhost:8080/api/v1/clusters/c1/alert_notices/2",
            "AlertNotice" : {
              "cluster_name" : "c1",
              "history_id" : 2,
              "id" : 2,
              "notification_state" : "DELIVERED",
              "service_name" : "HDFS",
              "target_id" : 1,
              "target_name" : "Administrators",
              "uuid" : "fffecdb4-0970-4dd0-22d3-706d53571321"
            }
          }
        ]
      }
      

      Attachments

        1. AMBARI-7778.patch
          83 kB
          Jonathan Hurley

        Issue Links

          Activity

            People

              jonathanhurley Jonathan Hurley
              jonathanhurley Jonathan Hurley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: