ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [2/2] git commit: AMBARI-8004 - Alerts: Convert Script-Style Oozie Alerts From Nagios (jonathanhurley)
Date Wed, 29 Oct 2014 14:22:56 GMT
AMBARI-8004 - Alerts: Convert Script-Style Oozie Alerts From Nagios (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: f645c21cfca27872829a1cf4349b0a25202ee40c
Parents: bcf1c99
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Tue Oct 28 12:33:43 2014 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Wed Oct 29 10:22:46 2014 -0400

----------------------------------------------------------------------
 .../python/ambari_agent/alerts/web_alert.py     | 54 +++++++++-----
 .../src/test/python/ambari_agent/TestAlerts.py  | 17 ++++-
 .../HDP/2.0.6/services/GANGLIA/alerts.json      | 10 +--
 .../stacks/HDP/2.0.6/services/HBASE/alerts.json |  4 +-
 .../stacks/HDP/2.0.6/services/HDFS/alerts.json  | 24 +++----
 .../stacks/HDP/2.0.6/services/HIVE/alerts.json  |  2 +-
 .../stacks/HDP/2.0.6/services/OOZIE/alerts.json | 40 +++++++++++
 .../package/files/alert_check_oozie_server.py   | 74 ++++++++++++++++++++
 .../stacks/HDP/2.0.6/services/YARN/alerts.json  | 26 +++----
 .../package/files/alert_nodemanager_health.py   |  2 +-
 .../HDP/2.0.6/services/ZOOKEEPER/alerts.json    |  2 +-
 .../stacks/HDP/2.1/services/FALCON/alerts.json  |  8 +--
 .../stacks/HDP/2.1/services/STORM/alerts.json   | 16 ++---
 .../stacks/HDP/2.2/services/KAFKA/alerts.json   |  2 +-
 .../stacks/HDP/2.2/services/KNOX/alerts.json    |  2 +-
 15 files changed, 214 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
index e0e36ef..03f2566 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py
@@ -46,41 +46,59 @@ class WebAlert(BaseAlert):
     logger.debug("Calculated web URI to be {0} (ssl={1})".format(alert_uri.uri, 
         str(alert_uri.is_ssl_enabled)))
 
+    url = self._build_web_query(alert_uri)
+    web_response = self._make_web_request(url)
+    status_code = web_response.status_code
+    time_seconds = web_response.time_millis / 1000
+
+    if status_code == 0:
+      return (self.RESULT_CRITICAL, [status_code, url, time_seconds])
+    
+    if status_code < 400:
+      return (self.RESULT_OK, [status_code, url, time_seconds])
+    
+    return (self.RESULT_WARNING, [status_code, url, time_seconds])
+
+
+  def _build_web_query(self, alert_uri):
+    """
+    Builds a URL out of the URI structure. If the URI is already a URL of
+    the form http[s]:// then this will return the URI as the URL; otherwise,
+    it will build the URL from the URI structure's elements
+    """
+    # shortcut if the supplied URI starts with the information needed
+    string_uri = str(alert_uri.uri)
+    if string_uri.startswith('http://') or string_uri.startswith('https://'):
+      return alert_uri.uri
+
+    # start building the URL manually
     host = BaseAlert.get_host_from_url(alert_uri.uri)
     if host is None:
       host = self.host_name
 
     # maybe slightly realistic
-    port = 80 
-    if alert_uri.is_ssl_enabled:
+    port = 80
+    if alert_uri.is_ssl_enabled is True:
       port = 443
-      
-    try:      
+
+    # extract the port
+    try:
       port = int(get_port_from_url(alert_uri.uri))
     except:
       pass
 
-    web_response = self._make_web_request(host, port, alert_uri.is_ssl_enabled)
-    status_code = web_response.status_code
-    time_seconds = web_response.time_millis / 1000
+    scheme = 'http'
+    if alert_uri.is_ssl_enabled is True:
+      scheme = 'https'
 
-    if status_code == 0:
-      return (self.RESULT_CRITICAL, [status_code, host, port, time_seconds])
-    
-    if status_code <= 401:
-      return (self.RESULT_OK, [status_code, host, port, time_seconds])
-    
-    return (self.RESULT_WARNING, [status_code, host, port, time_seconds])
+    return "{0}://{1}:{2}".format(scheme, host, str(port))
 
 
-  def _make_web_request(self, host, port, ssl):
+  def _make_web_request(self, url):
     """
     Makes an http(s) request to a web resource and returns the http code. If
     there was an error making the request, return 0 for the status code.
     """    
-    url = "{0}://{1}:{2}".format(
-        "https" if ssl else "http", host, str(port))
-    
     WebResponse = namedtuple('WebResponse', 'status_code time_millis')
     
     time_millis = 0

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestAlerts.py b/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
index 74d440f..88584db 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
@@ -329,7 +329,7 @@ class TestAlerts(TestCase):
             "text": "warning: {0}",
           },
           "critical": {
-            "text": "critical: {1}:{2}",
+            "text": "critical: {1}",
           }
         }
       }
@@ -365,9 +365,22 @@ class TestAlerts(TestCase):
     alert.set_helpers(collector, {'hdfs-site/dfs.datanode.http.address': '1.2.3.4:80'})
     alert.collect()
     
+    # http assertion indicating that we properly determined non-SSL
     self.assertEquals('CRITICAL', collector.alerts()[0]['state'])
-    self.assertEquals('critical: 1.2.3.4:80', collector.alerts()[0]['text'])
+    self.assertEquals('critical: http://1.2.3.4:80', collector.alerts()[0]['text'])
+     
+    collector = AlertCollector()
+    alert = WebAlert(json, json['source'])
+    alert.set_helpers(collector, {
+        'hdfs-site/dfs.datanode.http.address': '1.2.3.4:80',
+        'hdfs-site/dfs.datanode.https.address': '1.2.3.4:8443',
+        'hdfs-site/dfs.http.policy': 'HTTPS_ONLY'})
 
+    alert.collect()
+    
+    # SSL assertion
+    self.assertEquals('CRITICAL', collector.alerts()[0]['state'])
+    self.assertEquals('critical: https://1.2.3.4:8443', collector.alerts()[0]['text'])
 
   def test_reschedule(self):
     test_file_path = os.path.join('ambari_agent', 'dummy_files')

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/alerts.json
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/alerts.json
index 9b115d5..05053a3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/alerts.json
@@ -17,7 +17,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -37,7 +37,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -57,7 +57,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -77,7 +77,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -97,7 +97,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json
index 9846848..b8b8cab 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HBASE/alerts.json
@@ -41,7 +41,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -99,7 +99,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json
index 9ea31f0..0a6a455 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/alerts.json
@@ -91,15 +91,15 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
-          }        
+          }
         }
       },
       {
@@ -296,7 +296,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -329,7 +329,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -351,7 +351,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -373,7 +373,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -394,15 +394,15 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
-          }        
+          }
         }
       },    
       {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/alerts.json
index 3e4865d..6981de9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/alerts.json
@@ -16,7 +16,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/alerts.json
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/alerts.json
new file mode 100644
index 0000000..3443dc4
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/alerts.json
@@ -0,0 +1,40 @@
+{
+  "OOZIE": {
+    "service": [],
+    "OOZIE_SERVER": [
+      {
+        "name": "oozie_server_webui",
+        "label": "Oozie Server Web UI",
+        "interval": 1,
+        "scope": "ANY",
+        "source": {
+          "type": "WEB",
+          "uri": {
+            "http": "{{oozie-site/oozie.base.url}}/oozie"
+          },
+          "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}"
+            }
+          }
+        }
+      },
+      {
+        "name": "oozie_server_status",
+        "label": "Oozie Server Status",
+        "interval": 1,
+        "scope": "ANY",
+        "source": {
+          "type": "SCRIPT",
+          "path": "HDP/2.0.6/services/OOZIE/package/files/alert_check_oozie_server.py"
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/alert_check_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/alert_check_oozie_server.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/alert_check_oozie_server.py
new file mode 100644
index 0000000..7bf1255
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/alert_check_oozie_server.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+
+"""
+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.
+"""
+
+import subprocess
+from subprocess import CalledProcessError
+
+RESULT_CODE_OK = 'OK'
+RESULT_CODE_CRITICAL = 'CRITICAL'
+RESULT_CODE_UNKNOWN = 'UNKNOWN'
+
+OOZIE_URL_KEY = '{{oozie-site/oozie.base.url}}'
+
+def get_tokens():
+  """
+  Returns a tuple of tokens in the format {{site/property}} that will be used
+  to build the dictionary passed into execute
+  """
+  return (OOZIE_URL_KEY)
+  
+
+def execute(parameters=None, host_name=None):
+  """
+  Returns a tuple containing the result code and a pre-formatted result label
+
+  Keyword arguments:
+  parameters (dictionary): a mapping of parameter key to value
+  host_name (string): the name of this host where the alert is running
+  """
+
+  if parameters is None:
+    return (RESULT_CODE_UNKNOWN, ['There were no parameters supplied to the script.'])
+
+  oozie_url = None
+  if OOZIE_URL_KEY in parameters:
+    oozie_url = parameters[OOZIE_URL_KEY]
+
+  if oozie_url is None:
+    return (RESULT_CODE_UNKNOWN, ['The Oozie URL is a required parameter.'])
+
+  try:
+    # oozie admin -oozie http://server:11000/oozie -status
+    oozie_process = subprocess.Popen(['oozie', 'admin', '-oozie',
+      oozie_url, '-status'], stderr=subprocess.PIPE, stdout=subprocess.PIPE)
+
+    oozie_output, oozie_error = oozie_process.communicate()
+    oozie_return_code = oozie_process.returncode
+
+    if oozie_return_code == 0:
+      # strip trailing newlines
+      oozie_output = str(oozie_output).strip('\n')
+      return (RESULT_CODE_OK, [oozie_output])
+    else:
+      oozie_error = str(oozie_error).strip('\n')
+      return (RESULT_CODE_CRITICAL, [oozie_error])
+
+  except CalledProcessError, cpe:
+    return (RESULT_CODE_CRITICAL, [str(cpe)])

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json
index 9793dbe..20ef1ca 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/alerts.json
@@ -17,13 +17,13 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
           }
         }
@@ -115,7 +115,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }
@@ -166,13 +166,13 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
           }
         }
@@ -205,13 +205,13 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
           }
         }
@@ -305,13 +305,13 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
           }
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py
index 70584b0..b1de951 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/files/alert_nodemanager_health.py
@@ -31,7 +31,7 @@ NODEMANAGER_HTTPS_ADDRESS_KEY = '{{yarn-site/yarn.nodemanager.webapp.https.addre
 YARN_HTTP_POLICY_KEY = '{{yarn-site/yarn.http.policy}}'
 
 OK_MESSAGE = 'NodeManager Healthy'
-CRITICAL_CONNECTION_MESSAGE = 'Connection failed on host {0}'
+CRITICAL_CONNECTION_MESSAGE = 'Connection failed to {0}'
 CRITICAL_NODEMANAGER_STATUS_MESSAGE = 'NodeManager returned an unexpected status of "{0}"'
 CRITICAL_NODEMANAGER_UNKNOWN_JSON_MESSAGE = 'Unable to determine NodeManager health from
unexpected JSON response'
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json
index 8827294..be210ea 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/ZOOKEEPER/alerts.json
@@ -41,7 +41,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json
index c53230f..6b3e96c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json
@@ -16,7 +16,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }
@@ -35,13 +35,13 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
           }
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/alerts.json
index df4909b..ff9d91c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/alerts.json
@@ -42,7 +42,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }
@@ -60,13 +60,13 @@
           },
           "reporting": {
             "ok": {
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "warning":{
-              "text": "HTTP {0} response in {3:.4f} seconds"
+              "text": "HTTP {0} response in {2:.4f} seconds"
             },
             "critical": {
-              "text": "Connection failed to {1}:{2}"
+              "text": "Connection failed to {1}"
             }
           }
         }
@@ -88,7 +88,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }
@@ -110,7 +110,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }
@@ -132,7 +132,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }
@@ -154,7 +154,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.2/services/KAFKA/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KAFKA/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KAFKA/alerts.json
index a52feac..ad4af4f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KAFKA/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KAFKA/alerts.json
@@ -16,7 +16,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }        
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f645c21c/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/alerts.json
index 3d2883e..236875a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/alerts.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/alerts.json
@@ -16,7 +16,7 @@
               "text": "TCP OK - {0:.4f} response on port {1}"
             },
             "critical": {
-              "text": "Connection failed: {0} on host {1}:{2}"
+              "text": "Connection failed: {0} to {1}:{2}"
             }
           }
         }


Mime
View raw message