You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2016/02/12 19:31:00 UTC

[14/19] ambari git commit: AMBARI-382. Ambari Kafka alerts not respecting broker port configured in Ambari.(vbrodetskyi)

AMBARI-382. Ambari Kafka alerts not respecting broker port configured in Ambari.(vbrodetskyi)


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

Branch: refs/heads/2.2.1-maint
Commit: 6893b5a8b12a1f71815c66d3b6f462e9e2e119c3
Parents: abd26b2
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Fri Feb 12 03:15:24 2016 +0200
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Fri Feb 12 03:15:24 2016 +0200

----------------------------------------------------------------------
 .../python/ambari_agent/alerts/port_alert.py    |  2 +-
 .../stacks/HDP/2.3/services/KAFKA/alerts.json   | 32 ++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6893b5a8/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py
index 848da65..92d28ad 100644
--- a/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py
+++ b/ambari-agent/src/main/python/ambari_agent/alerts/port_alert.py
@@ -102,7 +102,7 @@ class PortAlert(BaseAlert):
 
 
     host = BaseAlert.get_host_from_url(uri_value)
-    if host is None:
+    if host is None or host == "localhost" or host == "0.0.0.0":
       host = self.host_name
 
     try:

http://git-wip-us.apache.org/repos/asf/ambari/blob/6893b5a8/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json
new file mode 100644
index 0000000..04fb583
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json
@@ -0,0 +1,32 @@
+{
+  "KAFKA": {
+    "service": [],
+    "KAFKA_BROKER": [
+      {
+        "name": "kafka_broker_process",
+        "label": "Kafka Broker Process",
+        "description": "This host-level alert is triggered if the Kafka Broker cannot be determined to be up.",
+        "interval": 1,
+        "scope": "HOST",
+        "source": {
+          "type": "PORT",
+          "uri": "{{kafka-broker/listeners}}",
+          "default_port": 6667,
+          "reporting": {
+            "ok": {
+              "text": "TCP OK - {0:.3f}s response on port {1}"
+            },
+            "warning": {
+              "text": "TCP OK - {0:.3f}s response on port {1}",
+              "value": 1.5
+            },
+            "critical": {
+              "text": "Connection failed: {0} to {1}:{2}",
+              "value": 5.0
+            }
+          }
+        }
+      }
+    ]
+  }
+}