Repository: ambari Updated Branches: refs/heads/branch-2.2 d5412a54f -> 1826e415d
AMBARI-15028. Critical alert for Kafka when using custom port(stack 2.3 and higher).(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1826e415 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1826e415 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1826e415 Branch: refs/heads/branch-2.2 Commit: 1826e415df254f3ad70524ebe25fca4d18cd1d58 Parents: d5412a5 Author: Vitaly Brodetskyi <vbrodets...@hortonworks.com> Authored: Fri Feb 12 03:08:17 2016 +0200 Committer: Vitaly Brodetskyi <vbrodets...@hortonworks.com> Committed: Fri Feb 12 03:08:17 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/1826e415/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/1826e415/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 + } + } + } + } + ] + } +}