You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2014/02/21 16:07:44 UTC

git commit: AMBARI-4778. Nagios reports a Host as down when it is actually up.(vbrodetskyi)

Repository: ambari
Updated Branches:
  refs/heads/trunk 267f679b6 -> d6d048d4a


AMBARI-4778. Nagios reports a Host as down when it is actually up.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: d6d048d4a7ba5ea43cc211c7a8f94d50146591e9
Parents: 267f679
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Fri Feb 21 17:06:25 2014 +0200
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Fri Feb 21 17:06:25 2014 +0200

----------------------------------------------------------------------
 .../package/templates/hadoop-hosts.cfg.j2       | 15 ++++-----
 .../package/templates/hadoop-hosts.cfg.j2       | 33 +++++++++++++++-----
 2 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d6d048d4/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2 b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
index 778e4f8..c7243a6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
@@ -18,13 +18,14 @@
 #
 {% for host in all_hosts %}
 define host {
-        alias        {{host}}
-        host_name    {{host}}
-        use          linux-server
-        address      {{host}}
-        check_interval         0.25
-        retry_interval         0.25
-        max_check_attempts     4
+        alias                     {{host}}
+        host_name                 {{host}}
+        use                       linux-server
+        address                   {{host}}
+        check_command             check_tcp_wrapper!{{all_ping_ports[loop.index-1]}}!-w 1 -c 1
+        check_interval            0.25
+        retry_interval            0.25
+        max_check_attempts        4
         notifications_enabled     1
         first_notification_delay  0     # Send notification soon after change in the hard state
         notification_interval     0     # Send the notification once

http://git-wip-us.apache.org/repos/asf/ambari/blob/d6d048d4/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2 b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
index 62555d4..c7243a6 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-hosts.cfg.j2
@@ -1,12 +1,31 @@
+# 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.
+#
+#
 {% for host in all_hosts %}
 define host {
-        alias        {{host}}
-        host_name    {{host}}
-        use          linux-server
-        address      {{host}}
-        check_interval         0.25
-        retry_interval         0.25
-        max_check_attempts     4
+        alias                     {{host}}
+        host_name                 {{host}}
+        use                       linux-server
+        address                   {{host}}
+        check_command             check_tcp_wrapper!{{all_ping_ports[loop.index-1]}}!-w 1 -c 1
+        check_interval            0.25
+        retry_interval            0.25
+        max_check_attempts        4
         notifications_enabled     1
         first_notification_delay  0     # Send notification soon after change in the hard state
         notification_interval     0     # Send the notification once