You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/11/19 17:04:49 UTC

[1/2] ambari git commit: AMBARI-8384. Alerts UI: Update alert_groups mapper to link alert groups and alert definitions (onechiporenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk a098ddd49 -> 040794d9d


http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/test/helpers.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/helpers.js b/ambari-web/test/helpers.js
new file mode 100644
index 0000000..eaa5363
--- /dev/null
+++ b/ambari-web/test/helpers.js
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+module.exports = {
+
+  /**
+   * Examples:
+   * <code>
+   *   var actual = [{a:1, b: [1, 2], c: 3}],
+   *    expected = [{a: 1, b: [1, 2]}];
+   *  nestedExpect(expected, actual); // valid
+   * </code>
+   *
+   * <code>
+   *   var actual = [{a:1, b: [1, 2]}],
+   *    expected = [{a: 1, b: [1, 2], c: 3}];
+   *  nestedExpect(expected, actual); // invalid valid (actual[0] doesn't contains key 'c)
+   * </code>
+   * @param {object[]} expected
+   * @param {object[]} actual
+   * @method nestedExpect
+   */
+  nestedExpect: function (expected, actual) {
+    expected.forEach(function (group, i) {
+      Em.keys(group).forEach(function (key) {
+        if ('array' === Em.typeOf(actual[i][key])) {
+          expect(group[key]).to.eql(actual[i][key].toArray());
+        }
+        else {
+          expect(group[key]).to.equal(actual[i][key]);
+        }
+      });
+    });
+  }
+
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/test/mappers/alert_definitions_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/alert_definitions_mapper_test.js b/ambari-web/test/mappers/alert_definitions_mapper_test.js
new file mode 100644
index 0000000..12535a5
--- /dev/null
+++ b/ambari-web/test/mappers/alert_definitions_mapper_test.js
@@ -0,0 +1,436 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+var App = require('app');
+
+require('mappers/alert_definitions_mapper');
+var testHelpers = require('test/helpers');
+
+describe('App.alertDefinitionsMapper', function () {
+
+  describe('#map', function () {
+
+    var json = {
+      items: [
+        {
+          "AlertDefinition" : {
+            "component_name" : "RESOURCEMANAGER",
+            "enabled" : true,
+            "id" : 1,
+            "ignore_host" : false,
+            "interval" : 5,
+            "label" : "ResourceManager RPC Latency",
+            "name" : "yarn_resourcemanager_rpc_latency",
+            "scope" : "ANY",
+            "service_name" : "YARN",
+            "source" : {
+              "jmx" : {
+                "property_list" : [
+                  "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcQueueTimeAvgTime",
+                  "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcProcessingTimeAvgTime"
+                ],
+                "value" : "{0}"
+              },
+              "reporting" : {
+                "ok" : {
+                  "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]"
+                },
+                "warning" : {
+                  "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]",
+                  "value" : 3000.0
+                },
+                "critical" : {
+                  "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]",
+                  "value" : 5000.0
+                }
+              },
+              "type" : "METRIC",
+              "uri" : {
+                "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
+                "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+                "https_property" : "{{yarn-site/yarn.http.policy}}",
+                "https_property_value" : "HTTPS_ONLY",
+                "default_port" : 0.0
+              }
+            }
+          }
+        },
+        {
+          "AlertDefinition" : {
+            "component_name" : "RESOURCEMANAGER",
+            "enabled" : true,
+            "id" : 2,
+            "ignore_host" : false,
+            "interval" : 1,
+            "label" : "ResourceManager Web UI",
+            "name" : "yarn_resourcemanager_webui",
+            "scope" : "ANY",
+            "service_name" : "YARN",
+            "source" : {
+              "reporting" : {
+                "ok" : {
+                  "text" : "HTTP {0} response in {2:.4f} seconds"
+                },
+                "warning" : {
+                  "text" : "HTTP {0} response in {2:.4f} seconds"
+                },
+                "critical" : {
+                  "text" : "Connection failed to {1}"
+                }
+              },
+              "type" : "WEB",
+              "uri" : {
+                "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
+                "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+                "https_property" : "{{yarn-site/yarn.http.policy}}",
+                "https_property_value" : "HTTPS_ONLY",
+                "default_port" : 0.0
+              }
+            }
+          }
+        },
+        {
+          "AlertDefinition" : {
+            "component_name" : null,
+            "enabled" : true,
+            "id" : 3,
+            "ignore_host" : false,
+            "interval" : 1,
+            "label" : "Percent NodeManagers Available",
+            "name" : "yarn_nodemanager_webui_percent",
+            "scope" : "SERVICE",
+            "service_name" : "YARN",
+            "source" : {
+              "alert_name" : "yarn_nodemanager_webui",
+              "reporting" : {
+                "ok" : {
+                  "text" : "affected: [{1}], total: [{0}]"
+                },
+                "warning" : {
+                  "text" : "affected: [{1}], total: [{0}]",
+                  "value" : 0.1
+                },
+                "critical" : {
+                  "text" : "affected: [{1}], total: [{0}]",
+                  "value" : 0.3
+                }
+              },
+              "type" : "AGGREGATE"
+            }
+          }
+        },
+        {
+          "AlertDefinition" : {
+            "component_name" : "NODEMANAGER",
+            "enabled" : true,
+            "id" : 4,
+            "ignore_host" : false,
+            "interval" : 1,
+            "label" : "NodeManager Health",
+            "name" : "yarn_nodemanager_health",
+            "scope" : "HOST",
+            "service_name" : "YARN",
+            "source" : {
+              "path" : "HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py",
+              "type" : "SCRIPT"
+            }
+          }
+        },
+        {
+          "AlertDefinition" : {
+            "component_name" : "ZOOKEEPER_SERVER",
+            "enabled" : true,
+            "id" : 5,
+            "ignore_host" : false,
+            "interval" : 1,
+            "label" : "ZooKeeper Server Process",
+            "name" : "zookeeper_server_process",
+            "scope" : "ANY",
+            "service_name" : "ZOOKEEPER",
+            "source" : {
+              "default_port" : 2181.0,
+              "reporting" : {
+                "ok" : {
+                  "text" : "TCP OK - {0:.4f} response on port {1}"
+                },
+                "critical" : {
+                  "text" : "Connection failed: {0} to {1}:{2}"
+                }
+              },
+              "type" : "PORT",
+              "uri" : "{{zookeeper-env/clientPort}}"
+            }
+          }
+        }
+      ]
+    };
+
+    beforeEach(function () {
+
+      App.alertDefinitionsMapper.setProperties({
+        'model': {},
+
+        'portModel': {},
+        'metricsModel': {},
+        'webModel': {},
+        'aggregateModel': {},
+        'scriptModel': {},
+
+        'reportModel': {},
+        'metricsSourceModel': {},
+        'metricsUriModel': {}
+      });
+
+      sinon.stub(App.PortAlertDefinition, 'find', function() {return [];});
+      sinon.stub(App.MetricsAlertDefinition, 'find', function() {return [];});
+      sinon.stub(App.WebAlertDefinition, 'find', function() {return [];});
+      sinon.stub(App.AggregateAlertDefinition, 'find', function() {return [];});
+      sinon.stub(App.ScriptAlertDefinition, 'find', function() {return [];});
+
+      sinon.stub(App.store, 'commit', Em.K);
+      sinon.stub(App.store, 'loadMany', function (type, content) {
+        type.content = content;
+      });
+
+      sinon.stub(App.router, 'get', function() {return false;});
+      App.cache['previousAlertGroupsMap'] = {};
+
+      sinon.stub(App.alertDefinitionsMapper, 'setMetricsSourcePropertyLists', Em.K);
+
+    });
+
+    afterEach(function () {
+
+      App.store.commit.restore();
+      App.store.loadMany.restore();
+
+      App.alertDefinitionsMapper.setProperties({
+        'model': App.AlertDefinition,
+
+        'portModel': App.PortAlertDefinition,
+        'metricsModel': App.MetricsAlertDefinition,
+        'webModel': App.WebAlertDefinition,
+        'aggregateModel': App.AggregateAlertDefinition,
+        'scriptModel': App.ScriptAlertDefinition,
+
+        'reportModel': App.AlertReportDefinition,
+        'metricsSourceModel': App.AlertMetricsSourceDefinition,
+        'metricsUriModel': App.AlertMetricsUriDefinition
+      });
+
+      App.PortAlertDefinition.find.restore();
+      App.MetricsAlertDefinition.find.restore();
+      App.WebAlertDefinition.find.restore();
+      App.AggregateAlertDefinition.find.restore();
+      App.ScriptAlertDefinition.find.restore();
+
+      App.router.get.restore();
+      App.cache['previousAlertGroupsMap'] = {};
+
+      App.alertDefinitionsMapper.setMetricsSourcePropertyLists.restore();
+
+    });
+
+    describe('should parse METRIC alertDefinitions', function () {
+
+      var data = {items: [json.items[0]]},
+        expected = [{
+          id: 1,
+          "name": "yarn_resourcemanager_rpc_latency",
+          "label": "ResourceManager RPC Latency",
+          "service_id": "YARN",
+          "component_name": "RESOURCEMANAGER",
+          "enabled": true,
+          "scope": "ANY",
+          "interval": 5,
+          "type": "METRIC",
+          "jmx_id": "1jmx",
+          "uri_id": "1uri"
+        }],
+        expectedMetricsSource = [{
+          "id":"1jmx",
+          "value":"{0}",
+          "property_list":[
+            "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcQueueTimeAvgTime",
+            "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcProcessingTimeAvgTime"
+          ]
+        }],
+        expectedMetricsUri = [{
+          "id":"1uri",
+          "http":"{{yarn-site/yarn.resourcemanager.webapp.address}}",
+          "https":"{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+          "https_property":"{{yarn-site/yarn.http.policy}}",
+          "https_property_value":"HTTPS_ONLY"
+        }];
+
+
+      beforeEach(function () {
+
+        App.alertDefinitionsMapper.map(data);
+
+      });
+
+      it('parsing metrics model', function() {
+        testHelpers.nestedExpect(expected, App.alertDefinitionsMapper.get('metricsModel.content'));
+      });
+
+      it('parse metrics source', function() {
+        testHelpers.nestedExpect(expectedMetricsSource, App.alertDefinitionsMapper.get('metricsSourceModel.content'));
+      });
+
+      it('parse metrics uri', function() {
+        testHelpers.nestedExpect(expectedMetricsUri, App.alertDefinitionsMapper.get('metricsUriModel.content'));
+      });
+
+    });
+
+    describe('should parse WEB alertDefinitions', function () {
+
+      var data = {items: [json.items[1]]},
+        expected = [
+          {
+            "id": 2,
+            "name": "yarn_resourcemanager_webui",
+            "label": "ResourceManager Web UI",
+            "service_id": "YARN",
+            "component_name": "RESOURCEMANAGER",
+            "enabled": true,
+            "scope": "ANY",
+            "interval": 1,
+            "type": "WEB",
+            "uri_id": "2uri"
+          }
+        ],
+        expectedMetricsUri = [{
+          "id":"2uri",
+          "http":"{{yarn-site/yarn.resourcemanager.webapp.address}}",
+          "https":"{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+          "https_property":"{{yarn-site/yarn.http.policy}}",
+          "https_property_value":"HTTPS_ONLY"
+        }];
+
+      beforeEach(function () {
+
+        App.alertDefinitionsMapper.map(data);
+
+      });
+
+      it('parsing web model', function() {
+        testHelpers.nestedExpect(expected, App.alertDefinitionsMapper.get('webModel.content'));
+      });
+
+
+      it('parse metrics uri', function() {
+        testHelpers.nestedExpect(expectedMetricsUri, App.alertDefinitionsMapper.get('metricsUriModel.content'));
+      });
+
+    });
+
+    it('should parse AGGREGATE alertDefinitions', function () {
+
+      var data = {items: [json.items[2]]},
+        expected = [
+          {
+            "id":3,
+            "name":"yarn_nodemanager_webui_percent",
+            "label":"Percent NodeManagers Available",
+            "service_id":"YARN",
+            "component_name":null,
+            "enabled":true,
+            "scope":"SERVICE",
+            "interval":1,
+            "type":"AGGREGATE",
+            "alert_name":"yarn_nodemanager_webui"
+          }
+        ];
+      App.alertDefinitionsMapper.map(data);
+
+      testHelpers.nestedExpect(expected, App.alertDefinitionsMapper.get('aggregateModel.content'));
+
+    });
+
+    it('should parse SCRIPT alertDefinitions', function () {
+
+      var data = {items: [json.items[3]]},
+        expected = [
+          {
+            "id":4,
+            "name":"yarn_nodemanager_health",
+            "label":"NodeManager Health",
+            "service_id":"YARN",
+            "component_name":"NODEMANAGER",
+            "enabled":true,
+            "scope":"HOST",
+            "interval":1,
+            "type":"SCRIPT",
+            "location":"HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py"
+          }
+        ];
+      App.alertDefinitionsMapper.map(data);
+
+      testHelpers.nestedExpect(expected, App.alertDefinitionsMapper.get('scriptModel.content'));
+
+    });
+
+    it('should parse PORT alertDefinitions', function () {
+
+      var data = {items: [json.items[4]]},
+        expected = [
+          {
+            "id":5,
+            "name":"zookeeper_server_process",
+            "label":"ZooKeeper Server Process",
+            "service_id":"ZOOKEEPER",
+            "component_name":"ZOOKEEPER_SERVER",
+            "enabled":true,
+            "scope":"ANY",
+            "interval":1,
+            "type":"PORT",
+            "default_port":2181,
+            "uri":"{{zookeeper-env/clientPort}}"
+          }
+        ];
+      App.alertDefinitionsMapper.map(data);
+
+      testHelpers.nestedExpect(expected, App.alertDefinitionsMapper.get('portModel.content'));
+
+    });
+
+    it('should set groups from App.cache.previousAlertGroupsMap', function () {
+
+      App.cache['previousAlertGroupsMap'] = {
+        1: [5,1],
+        2: [4,3],
+        3: [3,2],
+        4: [2,5],
+        5: [1,4]
+      };
+
+      App.alertDefinitionsMapper.map(json);
+
+      expect(App.alertDefinitionsMapper.get('portModel.content')[0].groups).to.eql([1, 4]);
+      expect(App.alertDefinitionsMapper.get('metricsModel.content')[0].groups).to.eql([5, 1]);
+      expect(App.alertDefinitionsMapper.get('webModel.content')[0].groups).to.eql([4, 3]);
+      expect(App.alertDefinitionsMapper.get('aggregateModel.content')[0].groups).to.eql([3, 2]);
+      expect(App.alertDefinitionsMapper.get('scriptModel.content')[0].groups).to.eql([2, 5]);
+
+
+    });
+
+  });
+
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/test/mappers/alert_groups_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/alert_groups_mapper_test.js b/ambari-web/test/mappers/alert_groups_mapper_test.js
new file mode 100644
index 0000000..b30747d
--- /dev/null
+++ b/ambari-web/test/mappers/alert_groups_mapper_test.js
@@ -0,0 +1,162 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+var App = require('app');
+
+require('mappers/alert_groups_mapper');
+var testHelpers = require('test/helpers');
+
+describe('App.alertGroupsMapper', function () {
+
+  describe('#map', function () {
+
+    var json = {
+      items: [
+        {
+          "AlertGroup" : {
+            "default" : true,
+            "definitions" : [
+              {
+                "id" : 8,
+                "source_type" : "PORT"
+              },
+              {
+                "id" : 9,
+                "source_type" : "AGGREGATE"
+              }
+            ],
+            "id" : 3,
+            "name" : "ZOOKEEPER"
+          }
+        },
+        {
+          "AlertGroup" : {
+            "default" : true,
+            "definitions" : [
+              {
+                "id" : 1,
+                "source_type" : "METRIC"
+              },
+              {
+                "id" : 2,
+                "source_type" : "WEB"
+              },
+              {
+                "id" : 3,
+                "source_type" : "WEB"
+              },
+              {
+                "id" : 4,
+                "source_type" : "AGGREGATE"
+              },
+              {
+                "id" : 5,
+                "source_type" : "METRIC"
+              },
+              {
+                "id" : 6,
+                "source_type" : "SCRIPT"
+              },
+              {
+                "id" : 7,
+                "source_type" : "WEB"
+              }
+            ],
+            "id" : 2,
+            "name" : "YARN"
+          }
+        }
+      ]
+    };
+
+    beforeEach(function () {
+
+      sinon.stub(App.store, 'commit', Em.K);
+      sinon.stub(App.store, 'loadMany', function (type, content) {
+        type.content = content;
+      });
+
+      App.alertGroupsMapper.set('model', {});
+      App.cache['previousAlertGroupsMap'] = {};
+
+    });
+
+    afterEach(function () {
+
+      App.store.commit.restore();
+      App.store.loadMany.restore();
+      App.alertGroupsMapper.set('model', App.AlertGroup);
+      App.cache['previousAlertGroupsMap'] = {};
+
+    });
+
+    it('should parse alert groups', function() {
+
+      var expected = [
+        {
+          id: 3,
+          name: 'ZOOKEEPER',
+          default: true,
+          port_alert_definitions: [8],
+          metrics_alert_definitions: [],
+          web_alert_definitions: [],
+          aggregate_alert_definitions: [9],
+          script_alert_definitions: []
+        },
+        {
+          id: 2,
+          name: 'YARN',
+          default: true,
+          port_alert_definitions: [],
+          metrics_alert_definitions: [1, 5],
+          web_alert_definitions: [2, 3, 7],
+          aggregate_alert_definitions: [4],
+          script_alert_definitions: [6]
+        }
+      ];
+
+      App.alertGroupsMapper.map(json);
+
+      var mapped = App.alertGroupsMapper.get('model.content');
+
+      testHelpers.nestedExpect(expected, mapped);
+
+    });
+
+    it('should set App.cache.previousAlertGroupsMap', function () {
+
+      var expected = {
+        8: [3],
+        9: [3],
+        1: [2],
+        2: [2],
+        3: [2],
+        4: [2],
+        5: [2],
+        6: [2],
+        7: [2]
+      };
+
+      App.alertGroupsMapper.map(json);
+
+      expect(App.cache['previousAlertGroupsMap']).to.eql(expected);
+
+    });
+
+  });
+
+});
\ No newline at end of file


[2/2] ambari git commit: AMBARI-8384. Alerts UI: Update alert_groups mapper to link alert groups and alert definitions (onechiporenko)

Posted by on...@apache.org.
AMBARI-8384. Alerts UI: Update alert_groups mapper to link alert groups and alert definitions (onechiporenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/040794d9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/040794d9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/040794d9

Branch: refs/heads/trunk
Commit: 040794d9dcc65e3097c9822abf7a16f3c1faa825
Parents: a098ddd
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Wed Nov 19 18:00:26 2014 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Wed Nov 19 18:00:26 2014 +0200

----------------------------------------------------------------------
 .../assets/data/alerts/alertDefinitions.json    | 683 ++++++++++---------
 .../app/assets/data/alerts/alertGroups.json     | 479 +++++++++----
 .../app/assets/data/alerts/alert_summary.json   | 676 +++++++++++++++++-
 ambari-web/app/assets/test/tests.js             |   2 +
 .../controllers/global/cluster_controller.js    |  23 +-
 .../app/mappers/alert_definitions_mapper.js     |  51 +-
 ambari-web/app/mappers/alert_groups_mapper.js   |  68 +-
 ambari-web/app/models/alert_definition.js       |   1 +
 ambari-web/app/models/alert_group.js            |  64 +-
 ambari-web/test/helpers.js                      |  50 ++
 .../mappers/alert_definitions_mapper_test.js    | 436 ++++++++++++
 .../test/mappers/alert_groups_mapper_test.js    | 162 +++++
 12 files changed, 2183 insertions(+), 512 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/assets/data/alerts/alertDefinitions.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/alertDefinitions.json b/ambari-web/app/assets/data/alerts/alertDefinitions.json
index 2da817b..8557980 100644
--- a/ambari-web/app/assets/data/alerts/alertDefinitions.json
+++ b/ambari-web/app/assets/data/alerts/alertDefinitions.json
@@ -1,148 +1,263 @@
 {
-  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions?fields=*",
+  "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions?fields=*",
   "items" : [
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/1",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/1",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "GANGLIA_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : "RESOURCEMANAGER",
         "enabled" : true,
         "id" : 1,
-        "interval" : 1,
-        "label" : "Ganglia History Server Process Monitor",
-        "name" : "ganglia_monitor_mapreduce_history_server",
+        "ignore_host" : false,
+        "interval" : 5,
+        "label" : "ResourceManager RPC Latency",
+        "name" : "yarn_resourcemanager_rpc_latency",
         "scope" : "ANY",
-        "service_name" : "GANGLIA",
+        "service_name" : "YARN",
         "source" : {
-          "default_port" : 8666.0,
+          "jmx" : {
+            "property_list" : [
+              "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcQueueTimeAvgTime",
+              "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcProcessingTimeAvgTime"
+            ],
+            "value" : "{0}"
+          },
           "reporting" : {
             "ok" : {
-              "text" : "TCP OK - {0:.4f} response on port {1}"
+              "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]"
+            },
+            "warning" : {
+              "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]",
+              "value" : 3000.0
             },
             "critical" : {
-              "text" : "Connection failed: {0} to {1}:{2}"
+              "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]",
+              "value" : 5000.0
             }
           },
-          "type" : "PORT",
-          "uri" : "8666"
+          "type" : "METRIC",
+          "uri" : {
+            "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
+            "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+            "https_property" : "{{yarn-site/yarn.http.policy}}",
+            "https_property_value" : "HTTPS_ONLY",
+            "default_port" : 0.0
+          }
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/2",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/2",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "GANGLIA_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : "RESOURCEMANAGER",
         "enabled" : true,
         "id" : 2,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "Ganglia ResourceManager Process Monitor",
-        "name" : "ganglia_monitor_yarn_resourcemanager",
+        "label" : "ResourceManager Web UI",
+        "name" : "yarn_resourcemanager_webui",
         "scope" : "ANY",
-        "service_name" : "GANGLIA",
+        "service_name" : "YARN",
         "source" : {
-          "default_port" : 8664.0,
           "reporting" : {
             "ok" : {
-              "text" : "TCP OK - {0:.4f} response on port {1}"
+              "text" : "HTTP {0} response in {2:.4f} seconds"
+            },
+            "warning" : {
+              "text" : "HTTP {0} response in {2:.4f} seconds"
             },
             "critical" : {
-              "text" : "Connection failed: {0} to {1}:{2}"
+              "text" : "Connection failed to {1}"
             }
           },
-          "type" : "PORT",
-          "uri" : "8664"
+          "type" : "WEB",
+          "uri" : {
+            "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
+            "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+            "https_property" : "{{yarn-site/yarn.http.policy}}",
+            "https_property_value" : "HTTPS_ONLY",
+            "default_port" : 0.0
+          }
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/3",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/3",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "GANGLIA_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : "APP_TIMELINE_SERVER",
         "enabled" : true,
         "id" : 3,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "Ganglia NameNode Process Monitor",
-        "name" : "ganglia_monitor_hdfs_namenode",
+        "label" : "App Timeline Web UI",
+        "name" : "yarn_app_timeline_server_webui",
         "scope" : "ANY",
-        "service_name" : "GANGLIA",
+        "service_name" : "YARN",
         "source" : {
-          "default_port" : 8661.0,
           "reporting" : {
             "ok" : {
-              "text" : "TCP OK - {0:.4f} response on port {1}"
+              "text" : "HTTP {0} response in {2:.4f} seconds"
+            },
+            "warning" : {
+              "text" : "HTTP {0} response in {2:.4f} seconds"
             },
             "critical" : {
-              "text" : "Connection failed: {0} to {1}:{2}"
+              "text" : "Connection failed to {1}"
             }
           },
-          "type" : "PORT",
-          "uri" : "8661"
+          "type" : "WEB",
+          "uri" : {
+            "http" : "{{yarn-site/yarn.timeline-service.webapp.address}}",
+            "https" : "{{yarn-site/yarn.timeline-service.webapp.https.address}}",
+            "https_property" : "{{yarn-site/yarn.http.policy}}",
+            "https_property_value" : "HTTPS_ONLY",
+            "default_port" : 0.0
+          }
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/4",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/4",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "GANGLIA_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : null,
         "enabled" : true,
         "id" : 4,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "Ganglia HBase Master Process Monitor",
-        "name" : "ganglia_monitor_hbase_master",
-        "scope" : "ANY",
-        "service_name" : "GANGLIA",
+        "label" : "Percent NodeManagers Available",
+        "name" : "yarn_nodemanager_webui_percent",
+        "scope" : "SERVICE",
+        "service_name" : "YARN",
         "source" : {
-          "default_port" : 8663.0,
+          "alert_name" : "yarn_nodemanager_webui",
           "reporting" : {
             "ok" : {
-              "text" : "TCP OK - {0:.4f} response on port {1}"
+              "text" : "affected: [{1}], total: [{0}]"
+            },
+            "warning" : {
+              "text" : "affected: [{1}], total: [{0}]",
+              "value" : 0.1
             },
             "critical" : {
-              "text" : "Connection failed: {0} to {1}:{2}"
+              "text" : "affected: [{1}], total: [{0}]",
+              "value" : 0.3
             }
           },
-          "type" : "PORT",
-          "uri" : "8663"
+          "type" : "AGGREGATE"
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/5",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/5",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "GANGLIA_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : "RESOURCEMANAGER",
         "enabled" : true,
         "id" : 5,
-        "interval" : 1,
-        "label" : "Ganglia Server Process",
-        "name" : "ganglia_server_process",
+        "ignore_host" : false,
+        "interval" : 5,
+        "label" : "ResourceManager CPU Utilization",
+        "name" : "yarn_resourcemanager_cpu",
         "scope" : "ANY",
-        "service_name" : "GANGLIA",
+        "service_name" : "YARN",
         "source" : {
-          "default_port" : 8651.0,
+          "jmx" : {
+            "property_list" : [
+              "java.lang:type=OperatingSystem/SystemCpuLoad",
+              "java.lang:type=OperatingSystem/AvailableProcessors"
+            ],
+            "value" : "{0} * 100"
+          },
           "reporting" : {
             "ok" : {
-              "text" : "TCP OK - {0:.4f} response on port {1}"
+              "text" : "{1} CPU, load {0:.1%}"
+            },
+            "warning" : {
+              "text" : "{1} CPU, load {0:.1%}",
+              "value" : 200.0
             },
             "critical" : {
-              "text" : "Connection failed: {0} to {1}:{2}"
+              "text" : "{1} CPU, load {0:.1%}",
+              "value" : 250.0
             }
           },
-          "type" : "PORT",
-          "uri" : "8651"
+          "type" : "METRIC",
+          "uri" : {
+            "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
+            "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
+            "https_property" : "{{yarn-site/yarn.http.policy}}",
+            "https_property_value" : "HTTPS_ONLY",
+            "default_port" : 0.0
+          }
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/6",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/6",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "ZOOKEEPER_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : "NODEMANAGER",
         "enabled" : true,
         "id" : 6,
+        "ignore_host" : false,
+        "interval" : 1,
+        "label" : "NodeManager Health",
+        "name" : "yarn_nodemanager_health",
+        "scope" : "HOST",
+        "service_name" : "YARN",
+        "source" : {
+          "path" : "HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py",
+          "type" : "SCRIPT"
+        }
+      }
+    },
+    {
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/7",
+      "AlertDefinition" : {
+        "cluster_name" : "tdk",
+        "component_name" : "NODEMANAGER",
+        "enabled" : true,
+        "id" : 7,
+        "ignore_host" : false,
+        "interval" : 1,
+        "label" : "NodeManager Web UI",
+        "name" : "yarn_nodemanager_webui",
+        "scope" : "HOST",
+        "service_name" : "YARN",
+        "source" : {
+          "reporting" : {
+            "ok" : {
+              "text" : "HTTP {0} response in {2:.4f} seconds"
+            },
+            "warning" : {
+              "text" : "HTTP {0} response in {2:.4f} seconds"
+            },
+            "critical" : {
+              "text" : "Connection failed to {1}"
+            }
+          },
+          "type" : "WEB",
+          "uri" : {
+            "http" : "{{yarn-site/yarn.nodemanager.webapp.address}}",
+            "https" : "{{yarn-site/yarn.nodemanager.webapp.https.address}}",
+            "https_property" : "{{yarn-site/yarn.http.policy}}",
+            "https_property_value" : "HTTPS_ONLY",
+            "default_port" : 8042.0
+          }
+        }
+      }
+    },
+    {
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/8",
+      "AlertDefinition" : {
+        "cluster_name" : "tdk",
+        "component_name" : "ZOOKEEPER_SERVER",
+        "enabled" : true,
+        "id" : 8,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "ZooKeeper Server Process",
         "name" : "zookeeper_server_process",
@@ -164,12 +279,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/7",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/9",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : null,
         "enabled" : true,
-        "id" : 7,
+        "id" : 9,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "Percent ZooKeeper Servers Available",
         "name" : "zookeeper_server_process_percent",
@@ -195,12 +311,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/8",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/10",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "HISTORYSERVER",
         "enabled" : true,
-        "id" : 8,
+        "id" : 10,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "History Server Web UI",
         "name" : "mapreduce_history_server_webui",
@@ -230,12 +347,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/9",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/11",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "HISTORYSERVER",
         "enabled" : true,
-        "id" : 9,
+        "id" : 11,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "History Server Process",
         "name" : "mapreduce_history_server_process",
@@ -257,12 +375,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/10",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/12",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "HISTORYSERVER",
         "enabled" : true,
-        "id" : 10,
+        "id" : 12,
+        "ignore_host" : false,
         "interval" : 5,
         "label" : "History Server RPC Latency",
         "name" : "mapreduce_history_server_rpc_latency",
@@ -301,12 +420,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/11",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/13",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "HISTORYSERVER",
         "enabled" : true,
-        "id" : 11,
+        "id" : 13,
+        "ignore_host" : false,
         "interval" : 5,
         "label" : "History Server CPU Utilization",
         "name" : "mapreduce_history_server_cpu",
@@ -345,254 +465,153 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/12",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/14",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "RESOURCEMANAGER",
+        "cluster_name" : "tdk",
+        "component_name" : "GANGLIA_SERVER",
         "enabled" : true,
-        "id" : 12,
-        "interval" : 5,
-        "label" : "ResourceManager RPC Latency",
-        "name" : "yarn_resourcemanager_rpc_latency",
+        "id" : 14,
+        "ignore_host" : false,
+        "interval" : 1,
+        "label" : "Ganglia History Server Process Monitor",
+        "name" : "ganglia_monitor_mapreduce_history_server",
         "scope" : "ANY",
-        "service_name" : "YARN",
+        "service_name" : "GANGLIA",
         "source" : {
-          "jmx" : {
-            "property_list" : [
-              "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcQueueTimeAvgTime",
-              "Hadoop:service=ResourceManager,name=RpcActivityForPort*/RpcProcessingTimeAvgTime"
-            ],
-            "value" : "{0}"
-          },
+          "default_port" : 8666.0,
           "reporting" : {
             "ok" : {
-              "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]"
-            },
-            "warning" : {
-              "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]",
-              "value" : 3000.0
+              "text" : "TCP OK - {0:.4f} response on port {1}"
             },
             "critical" : {
-              "text" : "Average Queue Time:[{0}], Average Processing Time:[{1}]",
-              "value" : 5000.0
+              "text" : "Connection failed: {0} to {1}:{2}"
             }
           },
-          "type" : "METRIC",
-          "uri" : {
-            "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
-            "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
-            "https_property" : "{{yarn-site/yarn.http.policy}}",
-            "https_property_value" : "HTTPS_ONLY",
-            "default_port" : 0.0
-          }
+          "type" : "PORT",
+          "uri" : "8666"
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/13",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/15",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "RESOURCEMANAGER",
+        "cluster_name" : "tdk",
+        "component_name" : "GANGLIA_SERVER",
         "enabled" : true,
-        "id" : 13,
+        "id" : 15,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "ResourceManager Web UI",
-        "name" : "yarn_resourcemanager_webui",
+        "label" : "Ganglia ResourceManager Process Monitor",
+        "name" : "ganglia_monitor_yarn_resourcemanager",
         "scope" : "ANY",
-        "service_name" : "YARN",
+        "service_name" : "GANGLIA",
         "source" : {
+          "default_port" : 8664.0,
           "reporting" : {
             "ok" : {
-              "text" : "HTTP {0} response in {2:.4f} seconds"
-            },
-            "warning" : {
-              "text" : "HTTP {0} response in {2:.4f} seconds"
+              "text" : "TCP OK - {0:.4f} response on port {1}"
             },
             "critical" : {
-              "text" : "Connection failed to {1}"
+              "text" : "Connection failed: {0} to {1}:{2}"
             }
           },
-          "type" : "WEB",
-          "uri" : {
-            "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
-            "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
-            "https_property" : "{{yarn-site/yarn.http.policy}}",
-            "https_property_value" : "HTTPS_ONLY",
-            "default_port" : 0.0
-          }
+          "type" : "PORT",
+          "uri" : "8664"
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/14",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/16",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "APP_TIMELINE_SERVER",
+        "cluster_name" : "tdk",
+        "component_name" : "GANGLIA_SERVER",
         "enabled" : true,
-        "id" : 14,
+        "id" : 16,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "App Timeline Web UI",
-        "name" : "yarn_app_timeline_server_webui",
+        "label" : "Ganglia NameNode Process Monitor",
+        "name" : "ganglia_monitor_hdfs_namenode",
         "scope" : "ANY",
-        "service_name" : "YARN",
+        "service_name" : "GANGLIA",
         "source" : {
+          "default_port" : 8661.0,
           "reporting" : {
             "ok" : {
-              "text" : "HTTP {0} response in {2:.4f} seconds"
-            },
-            "warning" : {
-              "text" : "HTTP {0} response in {2:.4f} seconds"
+              "text" : "TCP OK - {0:.4f} response on port {1}"
             },
             "critical" : {
-              "text" : "Connection failed to {1}"
+              "text" : "Connection failed: {0} to {1}:{2}"
             }
           },
-          "type" : "WEB",
-          "uri" : {
-            "http" : "{{yarn-site/yarn.timeline-service.webapp.address}}",
-            "https" : "{{yarn-site/yarn.timeline-service.webapp.https.address}}",
-            "https_property" : "{{yarn-site/yarn.http.policy}}",
-            "https_property_value" : "HTTPS_ONLY",
-            "default_port" : 0.0
-          }
+          "type" : "PORT",
+          "uri" : "8661"
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/15",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/17",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : null,
+        "cluster_name" : "tdk",
+        "component_name" : "GANGLIA_SERVER",
         "enabled" : true,
-        "id" : 15,
+        "id" : 17,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "Percent NodeManagers Available",
-        "name" : "yarn_nodemanager_webui_percent",
-        "scope" : "SERVICE",
-        "service_name" : "YARN",
-        "source" : {
-          "alert_name" : "yarn_nodemanager_webui",
-          "reporting" : {
-            "ok" : {
-              "text" : "affected: [{1}], total: [{0}]"
-            },
-            "warning" : {
-              "text" : "affected: [{1}], total: [{0}]",
-              "value" : 0.1
-            },
-            "critical" : {
-              "text" : "affected: [{1}], total: [{0}]",
-              "value" : 0.3
-            }
-          },
-          "type" : "AGGREGATE"
-        }
-      }
-    },
-    {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/16",
-      "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "RESOURCEMANAGER",
-        "enabled" : true,
-        "id" : 16,
-        "interval" : 5,
-        "label" : "ResourceManager CPU Utilization",
-        "name" : "yarn_resourcemanager_cpu",
+        "label" : "Ganglia HBase Master Process Monitor",
+        "name" : "ganglia_monitor_hbase_master",
         "scope" : "ANY",
-        "service_name" : "YARN",
+        "service_name" : "GANGLIA",
         "source" : {
-          "jmx" : {
-            "property_list" : [
-              "java.lang:type=OperatingSystem/SystemCpuLoad",
-              "java.lang:type=OperatingSystem/AvailableProcessors"
-            ],
-            "value" : "{0} * 100"
-          },
+          "default_port" : 8663.0,
           "reporting" : {
             "ok" : {
-              "text" : "{1} CPU, load {0:.1%}"
-            },
-            "warning" : {
-              "text" : "{1} CPU, load {0:.1%}",
-              "value" : 200.0
+              "text" : "TCP OK - {0:.4f} response on port {1}"
             },
             "critical" : {
-              "text" : "{1} CPU, load {0:.1%}",
-              "value" : 250.0
+              "text" : "Connection failed: {0} to {1}:{2}"
             }
           },
-          "type" : "METRIC",
-          "uri" : {
-            "http" : "{{yarn-site/yarn.resourcemanager.webapp.address}}",
-            "https" : "{{yarn-site/yarn.resourcemanager.webapp.https.address}}",
-            "https_property" : "{{yarn-site/yarn.http.policy}}",
-            "https_property_value" : "HTTPS_ONLY",
-            "default_port" : 0.0
-          }
-        }
-      }
-    },
-    {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/17",
-      "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "NODEMANAGER",
-        "enabled" : true,
-        "id" : 17,
-        "interval" : 1,
-        "label" : "NodeManager Health",
-        "name" : "yarn_nodemanager_health",
-        "scope" : "HOST",
-        "service_name" : "YARN",
-        "source" : {
-          "path" : "HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py",
-          "type" : "SCRIPT"
+          "type" : "PORT",
+          "uri" : "8663"
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/18",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/18",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "NODEMANAGER",
+        "cluster_name" : "tdk",
+        "component_name" : "GANGLIA_SERVER",
         "enabled" : true,
         "id" : 18,
+        "ignore_host" : false,
         "interval" : 1,
-        "label" : "NodeManager Web UI",
-        "name" : "yarn_nodemanager_webui",
-        "scope" : "HOST",
-        "service_name" : "YARN",
+        "label" : "Ganglia Server Process",
+        "name" : "ganglia_server_process",
+        "scope" : "ANY",
+        "service_name" : "GANGLIA",
         "source" : {
+          "default_port" : 8651.0,
           "reporting" : {
             "ok" : {
-              "text" : "HTTP {0} response in {2:.4f} seconds"
-            },
-            "warning" : {
-              "text" : "HTTP {0} response in {2:.4f} seconds"
+              "text" : "TCP OK - {0:.4f} response on port {1}"
             },
             "critical" : {
-              "text" : "Connection failed to {1}"
+              "text" : "Connection failed: {0} to {1}:{2}"
             }
           },
-          "type" : "WEB",
-          "uri" : {
-            "http" : "{{yarn-site/yarn.nodemanager.webapp.address}}",
-            "https" : "{{yarn-site/yarn.nodemanager.webapp.https.address}}",
-            "https_property" : "{{yarn-site/yarn.http.policy}}",
-            "https_property_value" : "HTTPS_ONLY",
-            "default_port" : 8042.0
-          }
+          "type" : "PORT",
+          "uri" : "8651"
         }
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/19",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/19",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "SECONDARY_NAMENODE",
         "enabled" : true,
         "id" : 19,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "Secondary NameNode Process",
         "name" : "secondary_namenode_process",
@@ -614,12 +633,32 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/20",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/20",
       "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "DATANODE",
+        "cluster_name" : "tdk",
+        "component_name" : "NAMENODE",
         "enabled" : true,
         "id" : 20,
+        "ignore_host" : true,
+        "interval" : 1,
+        "label" : "NameNode High Availability Health",
+        "name" : "namenode_ha_health",
+        "scope" : "ANY",
+        "service_name" : "HDFS",
+        "source" : {
+          "path" : "HDP/2.0.6/services/HDFS/package/files/alert_ha_namenode_health.py",
+          "type" : "SCRIPT"
+        }
+      }
+    },
+    {
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/21",
+      "AlertDefinition" : {
+        "cluster_name" : "tdk",
+        "component_name" : "DATANODE",
+        "enabled" : true,
+        "id" : 21,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "DataNode Web UI",
         "name" : "datanode_webui",
@@ -649,12 +688,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/21",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/22",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 21,
+        "id" : 22,
+        "ignore_host" : false,
         "interval" : 5,
         "label" : "NameNode Host CPU Utilization",
         "name" : "namenode_cpu",
@@ -693,12 +733,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/22",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/23",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 22,
+        "id" : 23,
+        "ignore_host" : false,
         "interval" : 2,
         "label" : "NameNode RPC Latency",
         "name" : "namenode_rpc_latency",
@@ -737,12 +778,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/23",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/24",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 23,
+        "id" : 24,
+        "ignore_host" : false,
         "interval" : 2,
         "label" : "NameNode Blocks Health",
         "name" : "namenode_hdfs_blocks_health",
@@ -781,12 +823,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/24",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/25",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 24,
+        "id" : 25,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "NameNode Web UI",
         "name" : "namenode_webui",
@@ -816,12 +859,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/25",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/26",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "DATANODE",
         "enabled" : true,
-        "id" : 25,
+        "id" : 26,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "DateNode Process",
         "name" : "datanode_process",
@@ -843,12 +887,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/26",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/27",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : null,
         "enabled" : true,
-        "id" : 26,
+        "id" : 27,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "Percent DataNodes Available",
         "name" : "datanode_process_percent",
@@ -874,12 +919,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/27",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/28",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 27,
+        "id" : 28,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "NameNode Process",
         "name" : "namenode_process",
@@ -901,12 +947,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/28",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/29",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 28,
+        "id" : 29,
+        "ignore_host" : false,
         "interval" : 2,
         "label" : "HDFS Capacity Utilization",
         "name" : "namenode_hdfs_capacity_utilization",
@@ -945,12 +992,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/29",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/30",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 29,
+        "id" : 30,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "NameNode Last Checkpoint",
         "name" : "namenode_last_checkpoint",
@@ -963,12 +1011,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/30",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/31",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "JOURNALNODE",
         "enabled" : true,
-        "id" : 30,
+        "id" : 31,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "JournalNode Process",
         "name" : "journalnode_process",
@@ -990,12 +1039,41 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/31",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/32",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
+        "component_name" : "ZKFC",
+        "enabled" : true,
+        "id" : 32,
+        "ignore_host" : false,
+        "interval" : 1,
+        "label" : "ZooKeeper Failover Controller Process",
+        "name" : "hdfs_zookeeper_failover_controller_process",
+        "scope" : "ANY",
+        "service_name" : "HDFS",
+        "source" : {
+          "default_port" : 2181.0,
+          "reporting" : {
+            "ok" : {
+              "text" : "TCP OK - {0:.4f} response on port {1}"
+            },
+            "critical" : {
+              "text" : "Connection failed: {0} on host {1}:{2}"
+            }
+          },
+          "type" : "PORT",
+          "uri" : "{{core-site/ha.zookeeper.quorum}}"
+        }
+      }
+    },
+    {
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/33",
+      "AlertDefinition" : {
+        "cluster_name" : "tdk",
         "component_name" : "NAMENODE",
         "enabled" : true,
-        "id" : 31,
+        "id" : 33,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "NameNode Directory Status",
         "name" : "namenode_directory_status",
@@ -1033,12 +1111,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/32",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/34",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : "DATANODE",
         "enabled" : true,
-        "id" : 32,
+        "id" : 34,
+        "ignore_host" : false,
         "interval" : 2,
         "label" : "DataNode Storage",
         "name" : "datanode_storage",
@@ -1077,12 +1156,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/33",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/35",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : null,
         "enabled" : true,
-        "id" : 33,
+        "id" : 35,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "Percent DataNodes With Available Space",
         "name" : "datanode_storage_percent",
@@ -1108,12 +1188,13 @@
       }
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/34",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_definitions/36",
       "AlertDefinition" : {
-        "cluster_name" : "c",
+        "cluster_name" : "tdk",
         "component_name" : null,
         "enabled" : true,
-        "id" : 34,
+        "id" : 36,
+        "ignore_host" : false,
         "interval" : 1,
         "label" : "Percent JournalNodes Available",
         "name" : "journalnode_process_percent",
@@ -1137,24 +1218,6 @@
           "type" : "AGGREGATE"
         }
       }
-    },
-    {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c/alert_definitions/35",
-      "AlertDefinition" : {
-        "cluster_name" : "c",
-        "component_name" : "AMBARI_AGENT",
-        "enabled" : true,
-        "id" : 35,
-        "interval" : 1,
-        "label" : "Ambari Agent Disk Usage",
-        "name" : "ambari_agent_disk_usage",
-        "scope" : "HOST",
-        "service_name" : "AMBARI",
-        "source" : {
-          "path" : "alert_disk_space.py",
-          "type" : "SCRIPT"
-        }
-      }
     }
   ]
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/assets/data/alerts/alertGroups.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/alertGroups.json b/ambari-web/app/assets/data/alerts/alertGroups.json
index 20e568d..0171da6 100644
--- a/ambari-web/app/assets/data/alerts/alertGroups.json
+++ b/ambari-web/app/assets/data/alerts/alertGroups.json
@@ -1,167 +1,394 @@
 {
-  "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups?fields=*",
+  "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups?fields=*",
   "items" : [
     {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/1",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups/1",
       "AlertGroup" : {
-        "cluster_name" : "c789",
+        "cluster_name" : "tdk",
         "default" : true,
+        "definitions" : [ ],
         "id" : 1,
-        "name" : "MAPREDUCE2"
+        "name" : "SLIDER"
       }
     },
     {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/2",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups/2",
       "AlertGroup" : {
-        "cluster_name" : "c789",
+        "cluster_name" : "tdk",
         "default" : true,
+        "definitions" : [
+          {
+            "name" : "yarn_resourcemanager_rpc_latency",
+            "label" : "ResourceManager RPC Latency",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : "RESOURCEMANAGER",
+            "id" : 1,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "yarn_resourcemanager_webui",
+            "label" : "ResourceManager Web UI",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : "RESOURCEMANAGER",
+            "id" : 2,
+            "source_type" : "WEB"
+          },
+          {
+            "name" : "yarn_app_timeline_server_webui",
+            "label" : "App Timeline Web UI",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : "APP_TIMELINE_SERVER",
+            "id" : 3,
+            "source_type" : "WEB"
+          },
+          {
+            "name" : "yarn_nodemanager_webui_percent",
+            "label" : "Percent NodeManagers Available",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : null,
+            "id" : 4,
+            "source_type" : "AGGREGATE"
+          },
+          {
+            "name" : "yarn_resourcemanager_cpu",
+            "label" : "ResourceManager CPU Utilization",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : "RESOURCEMANAGER",
+            "id" : 5,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "yarn_nodemanager_health",
+            "label" : "NodeManager Health",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : "NODEMANAGER",
+            "id" : 6,
+            "source_type" : "SCRIPT"
+          },
+          {
+            "name" : "yarn_nodemanager_webui",
+            "label" : "NodeManager Web UI",
+            "enabled" : true,
+            "service_name" : "YARN",
+            "component_name" : "NODEMANAGER",
+            "id" : 7,
+            "source_type" : "WEB"
+          }
+        ],
         "id" : 2,
-        "name" : "PIG"
+        "name" : "YARN"
       }
     },
     {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/3",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups/3",
       "AlertGroup" : {
-        "cluster_name" : "c789",
+        "cluster_name" : "tdk",
         "default" : true,
+        "definitions" : [
+          {
+            "name" : "zookeeper_server_process",
+            "label" : "ZooKeeper Server Process",
+            "enabled" : true,
+            "service_name" : "ZOOKEEPER",
+            "component_name" : "ZOOKEEPER_SERVER",
+            "id" : 8,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "zookeeper_server_process_percent",
+            "label" : "Percent ZooKeeper Servers Available",
+            "enabled" : true,
+            "service_name" : "ZOOKEEPER",
+            "component_name" : null,
+            "id" : 9,
+            "source_type" : "AGGREGATE"
+          }
+        ],
         "id" : 3,
-        "name" : "FALCON"
+        "name" : "ZOOKEEPER"
       }
     },
     {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/4",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups/4",
       "AlertGroup" : {
-        "cluster_name" : "c789",
+        "cluster_name" : "tdk",
         "default" : true,
+        "definitions" : [
+          {
+            "name" : "mapreduce_history_server_rpc_latency",
+            "label" : "History Server RPC Latency",
+            "enabled" : true,
+            "service_name" : "MAPREDUCE2",
+            "component_name" : "HISTORYSERVER",
+            "id" : 12,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "mapreduce_history_server_cpu",
+            "label" : "History Server CPU Utilization",
+            "enabled" : true,
+            "service_name" : "MAPREDUCE2",
+            "component_name" : "HISTORYSERVER",
+            "id" : 13,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "mapreduce_history_server_webui",
+            "label" : "History Server Web UI",
+            "enabled" : true,
+            "service_name" : "MAPREDUCE2",
+            "component_name" : "HISTORYSERVER",
+            "id" : 10,
+            "source_type" : "WEB"
+          },
+          {
+            "name" : "mapreduce_history_server_process",
+            "label" : "History Server Process",
+            "enabled" : true,
+            "service_name" : "MAPREDUCE2",
+            "component_name" : "HISTORYSERVER",
+            "id" : 11,
+            "source_type" : "PORT"
+          }
+        ],
         "id" : 4,
-        "name" : "FLUME"
+        "name" : "MAPREDUCE2"
       }
     },
     {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/5",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups/5",
       "AlertGroup" : {
-        "cluster_name" : "c789",
+        "cluster_name" : "tdk",
         "default" : true,
+        "definitions" : [
+          {
+            "name" : "ganglia_monitor_hbase_master",
+            "label" : "Ganglia HBase Master Process Monitor",
+            "enabled" : true,
+            "service_name" : "GANGLIA",
+            "component_name" : "GANGLIA_SERVER",
+            "id" : 17,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "ganglia_monitor_hdfs_namenode",
+            "label" : "Ganglia NameNode Process Monitor",
+            "enabled" : true,
+            "service_name" : "GANGLIA",
+            "component_name" : "GANGLIA_SERVER",
+            "id" : 16,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "ganglia_server_process",
+            "label" : "Ganglia Server Process",
+            "enabled" : true,
+            "service_name" : "GANGLIA",
+            "component_name" : "GANGLIA_SERVER",
+            "id" : 18,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "ganglia_monitor_mapreduce_history_server",
+            "label" : "Ganglia History Server Process Monitor",
+            "enabled" : true,
+            "service_name" : "GANGLIA",
+            "component_name" : "GANGLIA_SERVER",
+            "id" : 14,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "ganglia_monitor_yarn_resourcemanager",
+            "label" : "Ganglia ResourceManager Process Monitor",
+            "enabled" : true,
+            "service_name" : "GANGLIA",
+            "component_name" : "GANGLIA_SERVER",
+            "id" : 15,
+            "source_type" : "PORT"
+          }
+        ],
         "id" : 5,
-        "name" : "NAGIOS"
+        "name" : "GANGLIA"
       }
     },
     {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/6",
+      "href" : "http://host:8080/api/v1/clusters/tdk/alert_groups/6",
       "AlertGroup" : {
-        "cluster_name" : "c789",
+        "cluster_name" : "tdk",
         "default" : true,
+        "definitions" : [
+          {
+            "name" : "datanode_storage",
+            "label" : "DataNode Storage",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "DATANODE",
+            "id" : 34,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "datanode_storage_percent",
+            "label" : "Percent DataNodes With Available Space",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : null,
+            "id" : 35,
+            "source_type" : "AGGREGATE"
+          },
+          {
+            "name" : "hdfs_zookeeper_failover_controller_process",
+            "label" : "ZooKeeper Failover Controller Process",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "ZKFC",
+            "id" : 32,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "namenode_directory_status",
+            "label" : "NameNode Directory Status",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 33,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "journalnode_process_percent",
+            "label" : "Percent JournalNodes Available",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : null,
+            "id" : 36,
+            "source_type" : "AGGREGATE"
+          },
+          {
+            "name" : "secondary_namenode_process",
+            "label" : "Secondary NameNode Process",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "SECONDARY_NAMENODE",
+            "id" : 19,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "datanode_webui",
+            "label" : "DataNode Web UI",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "DATANODE",
+            "id" : 21,
+            "source_type" : "WEB"
+          },
+          {
+            "name" : "namenode_ha_health",
+            "label" : "NameNode High Availability Health",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 20,
+            "source_type" : "SCRIPT"
+          },
+          {
+            "name" : "namenode_rpc_latency",
+            "label" : "NameNode RPC Latency",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 23,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "namenode_cpu",
+            "label" : "NameNode Host CPU Utilization",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 22,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "namenode_webui",
+            "label" : "NameNode Web UI",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 25,
+            "source_type" : "WEB"
+          },
+          {
+            "name" : "namenode_hdfs_blocks_health",
+            "label" : "NameNode Blocks Health",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 24,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "datanode_process_percent",
+            "label" : "Percent DataNodes Available",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : null,
+            "id" : 27,
+            "source_type" : "AGGREGATE"
+          },
+          {
+            "name" : "datanode_process",
+            "label" : "DateNode Process",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "DATANODE",
+            "id" : 26,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "namenode_hdfs_capacity_utilization",
+            "label" : "HDFS Capacity Utilization",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 29,
+            "source_type" : "METRIC"
+          },
+          {
+            "name" : "namenode_process",
+            "label" : "NameNode Process",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 28,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "journalnode_process",
+            "label" : "JournalNode Process",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "JOURNALNODE",
+            "id" : 31,
+            "source_type" : "PORT"
+          },
+          {
+            "name" : "namenode_last_checkpoint",
+            "label" : "NameNode Last Checkpoint",
+            "enabled" : true,
+            "service_name" : "HDFS",
+            "component_name" : "NAMENODE",
+            "id" : 30,
+            "source_type" : "SCRIPT"
+          }
+        ],
         "id" : 6,
-        "name" : "HIVE"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/7",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 7,
-        "name" : "ZOOKEEPER"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/8",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 8,
         "name" : "HDFS"
       }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/9",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 9,
-        "name" : "OOZIE"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/10",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 10,
-        "name" : "SQOOP"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/11",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 11,
-        "name" : "YARN"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/12",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 12,
-        "name" : "TEZ"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/13",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 13,
-        "name" : "HBASE"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/14",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 14,
-        "name" : "GANGLIA"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/15",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : true,
-        "id" : 15,
-        "name" : "STORM"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/16",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : false,
-        "id" : 16,
-        "name" : "group lalala"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/17",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : false,
-        "id" : 17,
-        "name" : "group test"
-      }
-    },
-    {
-      "href" : "http://c6407.ambari.apache.org:8080/api/v1/clusters/c789/alert_groups/18",
-      "AlertGroup" : {
-        "cluster_name" : "c789",
-        "default" : false,
-        "id" : 18,
-        "name" : "group def empty"
-      }
     }
   ]
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/assets/data/alerts/alert_summary.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/alert_summary.json b/ambari-web/app/assets/data/alerts/alert_summary.json
index b870999..83b467c 100644
--- a/ambari-web/app/assets/data/alerts/alert_summary.json
+++ b/ambari-web/app/assets/data/alerts/alert_summary.json
@@ -1,13 +1,365 @@
 {
-  "href" : "http://localhost:8080/api/v1/clusters/c1/alerts?format=groupedSummary",
+  "href" : "http://host:8080/api/v1/clusters/tdk/alerts?format=groupedSummary",
   "alerts_summary_grouped" : [
     {
-      "definition_id" : 34,
+      "definition_id" : 10,
+      "definition_name" : "ganglia_monitor_mapreduce_history_server",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285093
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 1,
       "definition_name" : "yarn_resourcemanager_webui",
       "summary" : {
         "OK" : {
           "count" : 1,
-          "original_timestamp" : 1415732283450
+          "original_timestamp" : 1416397471466
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 19,
+      "definition_name" : "mapreduce_history_server_process",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397465241
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 26,
+      "definition_name" : "namenode_rpc_latency",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285482
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 2,
+      "definition_name" : "namenode_webui",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285443
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 15,
+      "definition_name" : "yarn_app_timeline_server_webui",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397350207
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 5,
+      "definition_name" : "namenode_last_checkpoint",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285530
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 24,
+      "definition_name" : "datanode_storage",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285587
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 14,
+      "definition_name" : "yarn_nodemanager_webui",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397531030
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 27,
+      "definition_name" : "datanode_storage_percent",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397300122
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 16,
+      "definition_name" : "ganglia_monitor_yarn_resourcemanager",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285097
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 18,
+      "definition_name" : "mapreduce_history_server_webui",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397471999
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 21,
+      "definition_name" : "zookeeper_server_process_percent",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397300320
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 9,
+      "definition_name" : "secondary_namenode_process",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397465287
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 4,
+      "definition_name" : "datanode_webui",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285439
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 32,
+      "definition_name" : "yarn_resourcemanager_cpu",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397645425
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 29,
+      "definition_name" : "namenode_cpu",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397345252
         },
         "WARNING" : {
           "count" : 0,
@@ -24,70 +376,334 @@
       }
     },
     {
-      "definition_id" : 12,
-      "definition_name" : "ganglia_monitor_mapreduce_history_server",
+      "definition_id" : 30,
+      "definition_name" : "mapreduce_history_server_rpc_latency",
       "summary" : {
         "OK" : {
           "count" : 1,
-          "original_timestamp" : 1415735183450
+          "original_timestamp" : 1416397645512
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 6,
+      "definition_name" : "ganglia_monitor_hbase_master",
+      "summary" : {
+        "OK" : {
+          "count" : 0,
+          "original_timestamp" : 0
         },
         "WARNING" : {
-          "count" : 3,
-          "original_timestamp" : 1415735183450
+          "count" : 0,
+          "original_timestamp" : 0
         },
         "CRITICAL" : {
           "count" : 1,
-          "original_timestamp" : 1415755183450
+          "original_timestamp" : 1416397105073
         },
         "UNKNOWN" : {
-          "count" : 2,
-          "original_timestamp" : 1412335183450
+          "count" : 0,
+          "original_timestamp" : 0
         }
       }
     },
     {
-      "definition_id" : 1,
+      "definition_id" : 23,
+      "definition_name" : "namenode_hdfs_blocks_health",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285485
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 31,
+      "definition_name" : "yarn_resourcemanager_rpc_latency",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397645406
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 13,
+      "definition_name" : "zookeeper_server_process",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285083
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 7,
+      "definition_name" : "datanode_process",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285159
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 20,
+      "definition_name" : "datanode_process_percent",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397300169
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 11,
+      "definition_name" : "namenode_process",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285181
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 8,
       "definition_name" : "ganglia_monitor_hdfs_namenode",
       "summary" : {
         "OK" : {
-          "count" : 2,
-          "original_timestamp" : 1415735183450
+          "count" : 1,
+          "original_timestamp" : 1416397285108
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 25,
+      "definition_name" : "namenode_hdfs_capacity_utilization",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285491
         },
         "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 22,
+      "definition_name" : "yarn_nodemanager_webui_percent",
+      "summary" : {
+        "OK" : {
           "count" : 1,
-          "original_timestamp" : 1415735183450
+          "original_timestamp" : 1416397541852
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
         },
         "CRITICAL" : {
-          "count" : 3,
-          "original_timestamp" : 1415855183450
+          "count" : 0,
+          "original_timestamp" : 0
         },
         "UNKNOWN" : {
-          "count" : 2,
-          "original_timestamp" : 1412335183450
+          "count" : 0,
+          "original_timestamp" : 0
         }
       }
     },
     {
-      "definition_id" : 1,
-      "definition_name" : "ganglia_monitor_hbase_master",
+      "definition_id" : 3,
+      "definition_name" : "namenode_directory_status",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285527
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 17,
+      "definition_name" : "yarn_nodemanager_health",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397530178
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 12,
+      "definition_name" : "ganglia_server_process",
+      "summary" : {
+        "OK" : {
+          "count" : 1,
+          "original_timestamp" : 1416397285115
+        },
+        "WARNING" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "CRITICAL" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        },
+        "UNKNOWN" : {
+          "count" : 0,
+          "original_timestamp" : 0
+        }
+      }
+    },
+    {
+      "definition_id" : 28,
+      "definition_name" : "mapreduce_history_server_cpu",
       "summary" : {
         "OK" : {
-          "count" : 2,
-          "original_timestamp" : 1415735183450
+          "count" : 1,
+          "original_timestamp" : 1416397645535
         },
         "WARNING" : {
-          "count" : 2,
-          "original_timestamp" : 1415735183450
+          "count" : 0,
+          "original_timestamp" : 0
         },
         "CRITICAL" : {
-          "count" : 3,
-          "original_timestamp" : 1415355183450
+          "count" : 0,
+          "original_timestamp" : 0
         },
         "UNKNOWN" : {
-          "count" : 2,
-          "original_timestamp" : 1412335183450
+          "count" : 0,
+          "original_timestamp" : 0
         }
       }
     }
   ]
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/assets/test/tests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/test/tests.js b/ambari-web/app/assets/test/tests.js
index eac3297..8fb8688 100644
--- a/ambari-web/app/assets/test/tests.js
+++ b/ambari-web/app/assets/test/tests.js
@@ -109,6 +109,8 @@ var files = ['test/init_model_test',
   'test/controllers/wizard/stack_upgrade/step3_controller_test',
   'test/login_test',
   'test/router_test',
+  'test/mappers/alert_groups_mapper_test',
+  'test/mappers/alert_definitions_mapper_test',
   'test/mappers/alert_definition_summary_mapper_test',
   'test/mappers/server_data_mapper_test',
   'test/mappers/hosts_mapper_test',

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/controllers/global/cluster_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/cluster_controller.js b/ambari-web/app/controllers/global/cluster_controller.js
index bd03394..17c995b 100644
--- a/ambari-web/app/controllers/global/cluster_controller.js
+++ b/ambari-web/app/controllers/global/cluster_controller.js
@@ -341,19 +341,20 @@ App.ClusterController = Em.Controller.extend({
           });
           self.updateLoadStatus('serviceMetrics');
 
-          updater.updateAlertDefinitions(function () {
-            if (App.get('supports.alerts')) {
-              updater.updateAlertDefinitionSummary(function() {
-                self.updateLoadStatus('alertDefinitions');
+          if (App.get('supports.alerts')) {
+            updater.updateAlertGroups(function () {
+              updater.updateAlertDefinitions(function() {
+                updater.updateAlertDefinitionSummary(function () {
+                  self.updateLoadStatus('alertGroups');
+                  self.updateLoadStatus('alertDefinitions');
+                });
               });
-            }
-            else {
-              self.updateLoadStatus('alertDefinitions');
-            }
-          });
-          updater.updateAlertGroups(function () {
+            });
+          }
+          else {
             self.updateLoadStatus('alertGroups');
-          });
+            self.updateLoadStatus('alertDefinitions');
+          }
         });
       });
       self.loadRootService().done(function (data) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/mappers/alert_definitions_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/alert_definitions_mapper.js b/ambari-web/app/mappers/alert_definitions_mapper.js
index f3e3db2..2b817d9 100644
--- a/ambari-web/app/mappers/alert_definitions_mapper.js
+++ b/ambari-web/app/mappers/alert_definitions_mapper.js
@@ -26,6 +26,12 @@ App.alertDefinitionsMapper = App.QuickDataMapper.create({
   metricsSourceModel: App.AlertMetricsSourceDefinition,
   metricsUriModel: App.AlertMetricsUriDefinition,
 
+  portModel: App.PortAlertDefinition,
+  metricsModel: App.MetricsAlertDefinition,
+  webModel: App.WebAlertDefinition,
+  aggregateModel: App.AggregateAlertDefinition,
+  scriptModel: App.ScriptAlertDefinition,
+
   config: {
     id: 'AlertDefinition.id',
     name: 'AlertDefinition.name',
@@ -67,21 +73,22 @@ App.alertDefinitionsMapper = App.QuickDataMapper.create({
   map: function (json) {
     if (json && json.items) {
 
-      var portAlertDefinitions = [];
-      var metricsAlertDefinitions = [];
-      var webAlertDefinitions = [];
-      var aggregateAlertDefinitions = [];
-      var scriptAlertDefinitions = [];
-      var alertReportDefinitions = [];
-      var alertMetricsSourceDefinitions = [];
-      var alertMetricsUriDefinitions = [];
-      var alertDefinitions = Array.prototype.concat.call(
-        Array.prototype, App.PortAlertDefinition.find().toArray(),
-        App.MetricsAlertDefinition.find().toArray(),
-        App.WebAlertDefinition.find().toArray(),
-        App.AggregateAlertDefinition.find().toArray(),
-        App.ScriptAlertDefinition.find().toArray()
-      );
+      var portAlertDefinitions = [],
+        metricsAlertDefinitions = [],
+        webAlertDefinitions = [],
+        aggregateAlertDefinitions = [],
+        scriptAlertDefinitions = [],
+        alertReportDefinitions = [],
+        alertMetricsSourceDefinitions = [],
+        alertMetricsUriDefinitions = [],
+        alertGroupsMap = App.cache['previousAlertGroupsMap'],
+        alertDefinitions = Array.prototype.concat.call(
+          Array.prototype, App.PortAlertDefinition.find().toArray(),
+          App.MetricsAlertDefinition.find().toArray(),
+          App.WebAlertDefinition.find().toArray(),
+          App.AggregateAlertDefinition.find().toArray(),
+          App.ScriptAlertDefinition.find().toArray()
+        );
 
       json.items.forEach(function (item) {
         var convertedReportDefinitions = [];
@@ -101,6 +108,10 @@ App.alertDefinitionsMapper = App.QuickDataMapper.create({
         item.reporting = convertedReportDefinitions;
         var alertDefinition = this.parseIt(item, this.get('config'));
 
+        if (alertGroupsMap[alertDefinition.id]) {
+          alertDefinition.groups = alertGroupsMap[alertDefinition.id];
+        }
+
         var oldAlertDefinition = alertDefinitions.findProperty('id', alertDefinition.id);
         if (oldAlertDefinition) {
           // new values will be parsed in the another mapper, so for now just use old values
@@ -163,11 +174,11 @@ App.alertDefinitionsMapper = App.QuickDataMapper.create({
       App.store.loadMany(this.get('metricsSourceModel'), alertMetricsSourceDefinitions);
       this.setMetricsSourcePropertyLists(this.get('metricsSourceModel'), alertMetricsSourceDefinitions);
       App.store.loadMany(this.get('metricsUriModel'), alertMetricsUriDefinitions);
-      App.store.loadMany(App.PortAlertDefinition, portAlertDefinitions);
-      App.store.loadMany(App.MetricsAlertDefinition, metricsAlertDefinitions);
-      App.store.loadMany(App.WebAlertDefinition, webAlertDefinitions);
-      App.store.loadMany(App.AggregateAlertDefinition, aggregateAlertDefinitions);
-      App.store.loadMany(App.ScriptAlertDefinition, scriptAlertDefinitions);
+      App.store.loadMany(this.get('portModel'), portAlertDefinitions);
+      App.store.loadMany(this.get('metricsModel'), metricsAlertDefinitions);
+      App.store.loadMany(this.get('webModel'), webAlertDefinitions);
+      App.store.loadMany(this.get('aggregateModel'), aggregateAlertDefinitions);
+      App.store.loadMany(this.get('scriptModel'), scriptAlertDefinitions);
       if (App.router.get('mainAlertDefinitionsController')) {
          App.router.set('mainAlertDefinitionsController.mapperTimestamp', (new Date()).getTime());
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/mappers/alert_groups_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/alert_groups_mapper.js b/ambari-web/app/mappers/alert_groups_mapper.js
index 255039c..d88fa52 100644
--- a/ambari-web/app/mappers/alert_groups_mapper.js
+++ b/ambari-web/app/mappers/alert_groups_mapper.js
@@ -17,8 +17,12 @@
 
 var App = require('app');
 
-var stringUtils = require('utils/string_utils');
-
+/**
+ * Mapper for <code>App.AlertGroup</code>
+ * Save general information
+ * Use <code>App.cache['previousAlertGroupsMap']</code> to store map alertDefinitions-alertGroups. This map is used
+ * in the <code>App.AlertDefinitionsMapper</code> to correctly link alertDefinitions and alertGroups
+ */
 App.alertGroupsMapper = App.QuickDataMapper.create({
 
   model: App.AlertGroup,
@@ -27,18 +31,66 @@ App.alertGroupsMapper = App.QuickDataMapper.create({
     id: 'AlertGroup.id',
     name: 'AlertGroup.name',
     default: 'AlertGroup.default',
-    definitions: 'AlertGroup.definitions',
     targets: 'AlertGroup.targets'
   },
 
+  /**
+   * Map for alertGroup's alertDefinitions
+   * Store alertDefinitions to alertGroup-properties basing on alertDefinitionType
+   * Format: key - alertDefinitionType, value - alertGroup-property where alertDefinition should be saved
+   * @type {object}
+   */
+  typesMap: {
+    PORT: 'port_alert_definitions',
+    METRIC: 'metrics_alert_definitions',
+    WEB: 'web_alert_definitions',
+    AGGREGATE: 'aggregate_alert_definitions',
+    SCRIPT: 'script_alert_definitions'
+  },
+
   map: function (json) {
-    if (json && json.items) {
-      var alertGroups = [];
-      var self = this;
-      json.items.forEach (function(item) {
-       alertGroups.push(self.parseIt(item, self.get('config')));
+    if (!Em.isNone(json, 'items')) {
+
+      var alertGroups = [],
+        self = this,
+        typesMap = this.get('typesMap'),
+        /**
+         * AlertGroups-map for <code>App.AlertDefinitionsMappers</code>
+         * Format:
+         * <code>
+         *   {
+         *    alert_definition1_id: [alert_group1_id, alert_group2_id],
+         *    alert_definition2_id: [alert_group3_id, alert_group1_id],
+         *    ...
+         *   }
+         * </code>
+         * @type {object}
+         */
+        alertDefinitionsGroupsMap = {};
+
+      json.items.forEach(function(item) {
+        var group = self.parseIt(item, self.get('config'));
+        Em.keys(typesMap).forEach(function(k) {
+          group[typesMap[k]] = [];
+        });
+        if (item.AlertGroup.definitions) {
+          item.AlertGroup.definitions.forEach(function(definition) {
+              var type = typesMap[definition.source_type];
+            if (!group[type].contains(definition.id)) {
+              group[type].push(definition.id);
+            }
+            if (Em.isNone(alertDefinitionsGroupsMap[definition.id])) {
+              alertDefinitionsGroupsMap[definition.id] = [];
+            }
+            alertDefinitionsGroupsMap[definition.id].push(group.id);
+          });
+        }
+        alertGroups.push(group);
       }, this);
+
+      App.cache['previousAlertGroupsMap'] = alertDefinitionsGroupsMap;
       App.store.loadMany(this.get('model'), alertGroups);
+      App.store.commit();
     }
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/models/alert_definition.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alert_definition.js b/ambari-web/app/models/alert_definition.js
index 7997d6a..302fa65 100644
--- a/ambari-web/app/models/alert_definition.js
+++ b/ambari-web/app/models/alert_definition.js
@@ -29,6 +29,7 @@ App.AlertDefinition = DS.Model.extend({
   scope: DS.attr('string'),
   interval: DS.attr('number'),
   type: DS.attr('string'),
+  groups: DS.hasMany('App.AlertGroup'),
   reporting: DS.hasMany('App.AlertReportDefinition'),
   lastTriggered: DS.attr('number'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/040794d9/ambari-web/app/models/alert_group.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/alert_group.js b/ambari-web/app/models/alert_group.js
index faa46e8..f9924c0 100644
--- a/ambari-web/app/models/alert_group.js
+++ b/ambari-web/app/models/alert_group.js
@@ -30,22 +30,72 @@ var App = require('app');
  * any service.
  */
 App.AlertGroup = DS.Model.extend({
-  id: null,
-  name: null,
-  description: null,
-  default: null,
-  definitions: [],
+
+  name: DS.attr('string'),
+
+  description: DS.attr('string'),
+
+  /**
+   * Is this group default for some service
+   * @type {boolean}
+   */
+  default: DS.attr('boolean'),
+
+  /**
+   * @type {App.AlertDefinition[]}
+   */
+  definitions: function () {
+    return Array.prototype.concat.call(
+      Array.prototype, this.get('portAlertDefinitions').toArray(),
+      this.get('metricsAlertDefinitions').toArray(),
+      this.get('webAlertDefinitions').toArray(),
+      this.get('aggregateAlertDefinitions').toArray(),
+      this.get('scriptAlertDefinitions').toArray()
+    );
+  }.property('portAlertDefinitions', 'metricsAlertDefinitions', 'webAlertDefinitions', 'aggregateAlertDefinitions', 'scriptAlertDefinitions'),
+
+  /**
+   * @type {App.PortAlertDefinition[]}
+   */
+  portAlertDefinitions: DS.hasMany('App.PortAlertDefinition'),
+
+  /**
+   * @type {App.MetricsAlertDefinition[]}
+   */
+  metricsAlertDefinitions: DS.hasMany('App.MetricsAlertDefinition'),
+
+  /**
+   * @type {App.WebAlertDefinition[]}
+   */
+  webAlertDefinitions: DS.hasMany('App.WebAlertDefinition'),
+
+  /**
+   * @type {App.AggregateAlertDefinition[]}
+   */
+  aggregateAlertDefinitions: DS.hasMany('App.AggregateAlertDefinition'),
+
+  /**
+   * @type {App.ScriptAlertDefinition[]}
+   */
+  scriptAlertDefinitions: DS.hasMany('App.ScriptAlertDefinition'),
+
   targets: [],
 
+  /**
+   * @type {string}
+   */
   displayName: function () {
     var name = this.get('name');
     if (name && name.length > App.config.CONFIG_GROUP_NAME_MAX_LENGTH) {
       var middle = Math.floor(App.config.CONFIG_GROUP_NAME_MAX_LENGTH / 2);
-      name = name.substring(0, middle) + "..." + name.substring(name.length-middle);
+      name = name.substring(0, middle) + "..." + name.substring(name.length - middle);
     }
     return this.get('default') ? (name + ' Default') : name;
   }.property('name', 'default'),
 
+  /**
+   * @type {string}
+   */
   displayNameDefinitions: function () {
     return this.get('displayName') + ' (' + this.get('definitions.length') + ')';
   }.property('displayName', 'definitions.length')
@@ -69,7 +119,7 @@ App.AlertGroupComplex = Ember.Object.extend({
     var name = this.get('name');
     if (name && name.length > App.config.CONFIG_GROUP_NAME_MAX_LENGTH) {
       var middle = Math.floor(App.config.CONFIG_GROUP_NAME_MAX_LENGTH / 2);
-      name = name.substring(0, middle) + "..." + name.substring(name.length-middle);
+      name = name.substring(0, middle) + "..." + name.substring(name.length - middle);
     }
     return this.get('default') ? (name + ' Default') : name;
   }.property('name', 'default'),