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
            }
          },
      ...
      }
      

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Ambari-trunk-Commit #563 (See https://builds.apache.org/job/Ambari-trunk-Commit/563/)
        AMBARI-7734 - Alerts: Create REST API Endpoint for Alert History (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=1dfe7fd93a5800a95baf8939f291b1208cabe18e)

        • ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Ambari-trunk-Commit #563 (See https://builds.apache.org/job/Ambari-trunk-Commit/563/ ) AMBARI-7734 - Alerts: Create REST API Endpoint for Alert History (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=1dfe7fd93a5800a95baf8939f291b1208cabe18e ) ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Ambari-trunk-Commit #562 (See https://builds.apache.org/job/Ambari-trunk-Commit/562/)
        AMBARI-7734 - Alerts: Create REST API Endpoint for Alert History (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=03784ecad819a6b6ee422b4ba6158e9d860f3655)

        • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProviderTest.java
        • ambari-server/src/main/resources/key_properties.json
        • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
        • ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertHistoryResourceDefinition.java
        • ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
        • ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
        • ambari-server/src/main/resources/properties.json
        • ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java
        • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/AlertHistoryRequest.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
        • ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java
        • ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java
        • ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity_.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProvider.java
        • ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProvider.java
        • ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java
        • ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity_.java
        • ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Ambari-trunk-Commit #562 (See https://builds.apache.org/job/Ambari-trunk-Commit/562/ ) AMBARI-7734 - Alerts: Create REST API Endpoint for Alert History (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=03784ecad819a6b6ee422b4ba6158e9d860f3655 ) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProviderTest.java ambari-server/src/main/resources/key_properties.json ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProviderTest.java ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java ambari-server/src/main/java/org/apache/ambari/server/api/resources/AlertHistoryResourceDefinition.java ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java ambari-server/src/main/resources/properties.json ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProviderTest.java ambari-server/src/main/java/org/apache/ambari/server/controller/AlertHistoryRequest.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertHistoryService.java ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProviderTest.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertHistoryEntity_.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertGroupResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertHistoryResourceProvider.java ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertDefinitionEntity_.java ambari-server/src/main/java/org/apache/ambari/server/api/query/JpaPredicateVisitor.java

          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:

              Development