ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: Revert "AMBARI-6286. Get rid of using macros as enviroment variables for nagios (aonishuk)"
Date Fri, 27 Jun 2014 10:56:33 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e6a0d45d6 -> cde42c76e


Revert "AMBARI-6286. Get rid of using macros as enviroment variables for nagios (aonishuk)"

This reverts commit 922c36714a66bf50527b58b85d1423382ed02588.


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

Branch: refs/heads/trunk
Commit: cde42c76edf40eec7586a5496bd42c68838b1b04
Parents: e6a0d45
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Jun 27 13:56:12 2014 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Jun 27 13:56:12 2014 +0300

----------------------------------------------------------------------
 .../services/NAGIOS/package/scripts/params.py   | 19 ---------
 .../package/templates/hadoop-commands.cfg.j2    | 40 +++++++++----------
 .../NAGIOS/package/templates/nagios.cfg.j2      |  3 +-
 .../services/NAGIOS/package/scripts/params.py   | 19 ---------
 .../package/templates/hadoop-commands.cfg.j2    | 42 ++++++++++----------
 .../NAGIOS/package/templates/nagios.cfg.j2      |  3 +-
 6 files changed, 45 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cde42c76/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py
index 0589c6c..ac955cd 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/params.py
@@ -159,22 +159,3 @@ hostgroup_defs = {
     'jobhistory': _hs_host,
     'journalnodes' : _journalnode_hosts
 }
-
-'''
-This is done due to performance issues.
-Since exposing ALL the nagios macros to environment via enable_environment_macros 1
-varibles gives high CPU load on large clusters (~2K)
-Add here any nagios macros you want to expose to environmental variables.
-'''
-AVAILABLE_NAGIOS_ENV_MACROS = [
-  "NAGIOS_KEYTAB",
-  "NAGIOS_USER",
-  "NAGIOS_SERVICEGROUPNAME",
-  "NAGIOS_SERVICEDESC",
-  "NAGIOS_HOSTNAME"
-]
-
-nagios_env = ""
-for macros in AVAILABLE_NAGIOS_ENV_MACROS:
-  nagios_env += format("{macros}=${macros}$ ")
-nagios_env += "\\\n"

http://git-wip-us.apache.org/repos/asf/ambari/blob/cde42c76/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
index 69be215..fe7495f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
@@ -42,101 +42,101 @@
 # 'check_cpu' check remote cpu load
 define command {
         command_name    check_cpu
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_cpu.php
-h $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u
$ARG8$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_cpu.php -h $HOSTADDRESS$
-p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u $ARG8$
        }
 {% endif %}
 
 # Check data node storage full 
 define command {
         command_name    check_datanode_storage
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_datanode_storage.php
-h $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -s
$ARG8$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_datanode_storage.php -h
$HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -s $ARG8$
        }
 
 define command{
         command_name    check_hdfs_blocks
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_hdfs_blocks.php
-h $ARG1$ -p $ARG2$ -s $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u $ARG8$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_hdfs_blocks.php -h $ARG1$
-p $ARG2$ -s $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u $ARG8$
        }
 
 define command{
         command_name    check_hdfs_capacity
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_hdfs_capacity.php
-h $ARG1$ -p $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t $ARG8$ -s $ARG9$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_hdfs_capacity.php -h $ARG1$
-p $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t $ARG8$ -s $ARG9$
        }
 
 define command{
         command_name    check_aggregate
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_aggregate.php
-f /var/nagios/status.dat -s 1 -t service -n $ARG1$ -w $ARG2$ -c $ARG3$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_aggregate.php -f /var/nagios/status.dat
-s 1 -t service -n $ARG1$ -w $ARG2$ -c $ARG3$
        }
 
 define command{
         command_name    check_rpcq_latency
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_rpcq_latency.php
-h $HOSTADDRESS$ -p $ARG2$ -n $ARG1$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t
$ARG8$ -s $ARG9$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_rpcq_latency.php -h $HOSTADDRESS$
-p $ARG2$ -n $ARG1$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t $ARG8$ -s $ARG9$
        }
 
 define command{
         command_name    check_nagios
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_nagios -e $ARG1$
-F $ARG2$ -C $ARG3$ 
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_nagios -e $ARG1$ -F $ARG2$
-C $ARG3$ 
        }
 
 define command{
         command_name    check_webui
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_webui.sh $ARG1$
$HOSTADDRESS$ $ARG2$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_webui.sh $ARG1$ $HOSTADDRESS$
$ARG2$
        }
 
 define command{
         command_name    check_name_dir_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_name_dir_status.php
-h $HOSTADDRESS$ -p $ARG1$ -e $ARG2$ -k $ARG3$ -r $ARG4$ -t $ARG5$ -s $ARG6$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_name_dir_status.php -h
$HOSTADDRESS$ -p $ARG1$ -e $ARG2$ -k $ARG3$ -r $ARG4$ -t $ARG5$ -s $ARG6$
        }
 
 define command{
         command_name    check_oozie_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_oozie_status.sh
$HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_oozie_status.sh $HOSTADDRESS$
$ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 
 define command{
         command_name    check_templeton_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_templeton_status.sh
$HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_templeton_status.sh $HOSTADDRESS$
$ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 
 define command{
         command_name    check_hive_metastore_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_hive_metastore_status.sh
$HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_hive_metastore_status.sh $HOSTADDRESS$
$ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 define command{
         command_name    check_hue_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_hue_status.sh
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_hue_status.sh
        }
 
 define command{
         command_name    check_mapred_local_dir_used_space
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_mapred_local_dir_used.sh
$ARG1$ $ARG2$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_mapred_local_dir_used.sh $ARG1$
$ARG2$
        }
 
 define command{
         command_name    check_namenodes_ha
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_namenodes_ha.sh
$ARG1$ $ARG2$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_namenodes_ha.sh $ARG1$ $ARG2$
        }
 
 define command{
         command_name    check_nodemanager_health
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_nodemanager_health.sh
$HOSTADDRESS$ $ARG1$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_nodemanager_health.sh $HOSTADDRESS$
$ARG1$
        }
 
 define command{
         command_name    host_sys_logger
-        command_line    {{nagios_env}} $USER1$/sys_logger.py $HOSTSTATETYPE$ $HOSTATTEMPT$
$HOSTSTATE$ "Host::Ping" "Event Host=$HOSTADDRESS$($HOSTSTATE$), $HOSTOUTPUT$ $LONGHOSTOUTPUT$"
+        command_line    $USER1$/sys_logger.py $HOSTSTATETYPE$ $HOSTATTEMPT$ $HOSTSTATE$ "Host::Ping"
"Event Host=$HOSTADDRESS$($HOSTSTATE$), $HOSTOUTPUT$ $LONGHOSTOUTPUT$"
        }
 
 define command{
         command_name    service_sys_logger
-        command_line    {{nagios_env}} $USER1$/sys_logger.py $SERVICESTATETYPE$ $SERVICEATTEMPT$
$SERVICESTATE$ "$SERVICEDESC$" "Event Host=$HOSTADDRESS$ Service Description=$SERVICEDESC$($SERVICESTATE$),
$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$"
+        command_line    $USER1$/sys_logger.py $SERVICESTATETYPE$ $SERVICEATTEMPT$ $SERVICESTATE$
"$SERVICEDESC$" "Event Host=$HOSTADDRESS$ Service Description=$SERVICEDESC$($SERVICESTATE$),
$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$"
        }
 
 define command{
         command_name check_tcp_wrapper
-        command_line  {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$
-p $ARG1$ $ARG2$
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
$ARG2$
        }
 
 define command{
         command_name check_tcp_wrapper_sasl
-        command_line  {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$
-p $ARG1$ $ARG2$ -s \"$ARG3$\"
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
$ARG2$ -s \"$ARG3$\"
        }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cde42c76/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2
index 3171228..aa37a01 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/nagios.cfg.j2
@@ -1283,7 +1283,8 @@ use_large_installation_tweaks=1
 # Values: 1 - Enable environment variable macros (default)
 #         0 - Disable environment variable macros
 
-enable_environment_macros=0
+# NAGIOS_* macros are required for Ambari Maintenance Mode (check_wrapper.sh)
+enable_environment_macros=1
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cde42c76/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
index 1074b84..8fcdd14 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
@@ -228,22 +228,3 @@ hostgroup_defs = {
     'falcon-server' : _falcon_host,
     'ats-servers' : _app_timeline_server_hosts
 }
-
-'''
-This is done due to performance issues.
-Since exposing ALL the nagios macros to environment via enable_environment_macros 1
-varibles gives high CPU load on large clusters (~2K)
-Add here any nagios macros you want to expose to environmental variables.
-'''
-AVAILABLE_NAGIOS_ENV_MACROS = [
-  "NAGIOS_KEYTAB",
-  "NAGIOS_USER",
-  "NAGIOS_SERVICEGROUPNAME",
-  "NAGIOS_SERVICEDESC",
-  "NAGIOS_HOSTNAME"
-]
-
-nagios_env = ""
-for macros in AVAILABLE_NAGIOS_ENV_MACROS:
-  nagios_env += format("{macros}=${macros}$ ")
-nagios_env += "\\\n"

http://git-wip-us.apache.org/repos/asf/ambari/blob/cde42c76/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
index 71f2944..fa38a06 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2
@@ -42,106 +42,106 @@
 # 'check_cpu' check remote cpu load
 define command {
         command_name    check_cpu
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_cpu.php
-h $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u
$ARG8$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_cpu.php -h $HOSTADDRESS$
-p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u $ARG8$
        }
 {% endif %}
 
 # Check data node storage full 
 define command {
         command_name    check_datanode_storage
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_datanode_storage.php
-h $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -s
$ARG8$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_datanode_storage.php -h
$HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -s $ARG8$
        }
 
 define command{
         command_name    check_hdfs_blocks
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_hdfs_blocks.php
-h $ARG1$ -p $ARG2$ -s $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u $ARG8$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_hdfs_blocks.php -h $ARG1$
-p $ARG2$ -s $ARG3$ -e $ARG4$ -k $ARG5$ -r $ARG6$ -t $ARG7$ -u $ARG8$
        }
 
 define command{
         command_name    check_hdfs_capacity
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_hdfs_capacity.php
-h $ARG1$ -p $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t $ARG8$ -s $ARG9$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_hdfs_capacity.php -h $ARG1$
-p $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t $ARG8$ -s $ARG9$
        }
 
 define command{
         command_name    check_aggregate
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_aggregate.php
-f /var/nagios/status.dat -s 1 -t service -n $ARG1$ -w $ARG2$ -c $ARG3$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_aggregate.php -f /var/nagios/status.dat
-s 1 -t service -n $ARG1$ -w $ARG2$ -c $ARG3$
        }
 
 define command{
         command_name    check_rpcq_latency
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_rpcq_latency.php
-h $HOSTADDRESS$ -p $ARG2$ -n $ARG1$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t
$ARG8$ -s $ARG9$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_rpcq_latency.php -h $HOSTADDRESS$
-p $ARG2$ -n $ARG1$ -w $ARG3$ -c $ARG4$ -e $ARG5$ -k $ARG6$ -r $ARG7$ -t $ARG8$ -s $ARG9$
        }
 
 define command{
         command_name    check_nagios
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_nagios -e $ARG1$
-F $ARG2$ -C $ARG3$ 
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_nagios -e $ARG1$ -F $ARG2$
-C $ARG3$ 
        }
 
 define command{
         command_name    check_webui
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_webui.sh $ARG1$
$HOSTADDRESS$ $ARG2$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_webui.sh $ARG1$ $HOSTADDRESS$
$ARG2$
        }
 
 define command{
         command_name    check_name_dir_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh php $USER1$/check_name_dir_status.php
-h $HOSTADDRESS$ -p $ARG1$ -e $ARG2$ -k $ARG3$ -r $ARG4$ -t $ARG5$ -s $ARG6$
+        command_line    $USER1$/check_wrapper.sh php $USER1$/check_name_dir_status.php -h
$HOSTADDRESS$ -p $ARG1$ -e $ARG2$ -k $ARG3$ -r $ARG4$ -t $ARG5$ -s $ARG6$
        }
 
 define command{
         command_name    check_oozie_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_oozie_status.sh
$HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_oozie_status.sh $HOSTADDRESS$
$ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 
 define command{
         command_name    check_templeton_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_templeton_status.sh
$HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_templeton_status.sh $HOSTADDRESS$
$ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 
 define command{
         command_name    check_hive_metastore_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_hive_metastore_status.sh
$HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_hive_metastore_status.sh $HOSTADDRESS$
$ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
        }
 define command{
         command_name    check_hue_status
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_hue_status.sh
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_hue_status.sh
        }
 
 define command{
        command_name    check_mapred_local_dir_used_space
-       command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_mapred_local_dir_used.sh
$ARG1$ $ARG2$
+       command_line    $USER1$/check_wrapper.sh $USER1$/check_mapred_local_dir_used.sh $ARG1$
$ARG2$
        }
 
 define command{
        command_name    check_namenodes_ha
-       command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_namenodes_ha.sh
$ARG1$ $ARG2$
+       command_line    $USER1$/check_wrapper.sh $USER1$/check_namenodes_ha.sh $ARG1$ $ARG2$
        }
 
 define command{
         command_name    check_nodemanager_health
-        command_line    {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_nodemanager_health.sh
$HOSTADDRESS$ $ARG1$
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_nodemanager_health.sh $HOSTADDRESS$
$ARG1$
        }
 
 define command{
         command_name    host_sys_logger
-        command_line    {{nagios_env}} $USER1$/sys_logger.py $HOSTSTATETYPE$ $HOSTATTEMPT$
$HOSTSTATE$ "Host::Ping" "Event Host=$HOSTADDRESS$($HOSTSTATE$), $HOSTOUTPUT$ $LONGHOSTOUTPUT$"
+        command_line    $USER1$/sys_logger.py $HOSTSTATETYPE$ $HOSTATTEMPT$ $HOSTSTATE$ "Host::Ping"
"Event Host=$HOSTADDRESS$($HOSTSTATE$), $HOSTOUTPUT$ $LONGHOSTOUTPUT$"
        }
 
 define command{
         command_name    service_sys_logger
-        command_line    {{nagios_env}} $USER1$/sys_logger.py $SERVICESTATETYPE$ $SERVICEATTEMPT$
$SERVICESTATE$ "$SERVICEDESC$" "Event Host=$HOSTADDRESS$ Service Description=$SERVICEDESC$($SERVICESTATE$),
$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$"
+        command_line    $USER1$/sys_logger.py $SERVICESTATETYPE$ $SERVICEATTEMPT$ $SERVICESTATE$
"$SERVICEDESC$" "Event Host=$HOSTADDRESS$ Service Description=$SERVICEDESC$($SERVICESTATE$),
$SERVICEOUTPUT$ $LONGSERVICEOUTPUT$"
        }
 
 define command{
         command_name check_tcp_wrapper
-        command_line  {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$
-p $ARG1$ $ARG2$
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
$ARG2$
        }
 
 define command{
         command_name check_checkpoint_time
-        command_line {{nagios_env}} $USER1$/check_wrapper.sh /var/lib/ambari-agent/ambari-python-wrap
$USER1$/check_checkpoint_time.py -H "$ARG1$" -p $ARG2$ -w $ARG3$ -c $ARG4$ -t $ARG5$ -x $ARG6$
+        command_line $USER1$/check_wrapper.sh /var/lib/ambari-agent/ambari-python-wrap $USER1$/check_checkpoint_time.py
-H "$ARG1$" -p $ARG2$ -w $ARG3$ -c $ARG4$ -t $ARG5$ -x $ARG6$
        }
 
 define command{
         command_name check_tcp_wrapper_sasl
-        command_line {{nagios_env}} $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$
-p $ARG1$ $ARG2$ -s \"$ARG3$\"
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
$ARG2$ -s \"$ARG3$\"
        }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cde42c76/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2
index 1fe40d1..d51471b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.cfg.j2
@@ -1280,7 +1280,8 @@ use_large_installation_tweaks=1
 # Values: 1 - Enable environment variable macros (default)
 #         0 - Disable environment variable macros
 
-enable_environment_macros=0
+# NAGIOS_* macros are required for Ambari Maintenance Mode (check_wrapper.sh)
+enable_environment_macros=1
 
 
 


Mime
View raw message