ソースを参照

AMBARI-6243. Alerts for 'Percent <components> live' hang for long time after enabling Maintenance mode (dlysnichenko)

Lisnichenko Dmitro 11 年 前
コミット
971685e06f

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/files/check_wrapper.sh

@@ -67,7 +67,7 @@ real_comp_var=""
 real_component real_comp_var
 
 
-wrapper_output=`exec $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20}`
+wrapper_output=`exec "$@"`
 wrapper_result=$?
 
 if [ "$wrapper_result" == "0" ]; then

+ 11 - 12
ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/templates/hadoop-commands.cfg.j2

@@ -42,7 +42,6 @@
 # 'check_cpu' check remote cpu load
 define command {
         command_name    check_cpu
-#        command_line    $USER1$/check_wrapper.sh $USER1$/check_cpu.pl -H $HOSTADDRESS$ -C hadoop -w $ARG1$ -c $ARG2$
         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 %}
@@ -65,7 +64,7 @@ define command{
 
 define command{
         command_name    check_aggregate
-        command_line    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{
@@ -108,13 +107,13 @@ define command{
        }
 
 define command{
-       command_name    check_mapred_local_dir_used_space
-       command_line    $USER1$/check_wrapper.sh $USER1$/check_mapred_local_dir_used.sh $ARG1$ $ARG2$
+        command_name    check_mapred_local_dir_used_space
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_mapred_local_dir_used.sh $ARG1$ $ARG2$
        }
 
 define command{
-       command_name    check_namenodes_ha
-       command_line    $USER1$/check_wrapper.sh $USER1$/check_namenodes_ha.sh $ARG1$ $ARG2$
+        command_name    check_namenodes_ha
+        command_line    $USER1$/check_wrapper.sh $USER1$/check_namenodes_ha.sh $ARG1$ $ARG2$
        }
 
 define command{
@@ -133,11 +132,11 @@ define command{
        }
 
 define command{
-  command_name check_tcp_wrapper
-  command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
-}
+        command_name check_tcp_wrapper
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
+       }
 
 define command{
-  command_name check_tcp_wrapper_sasl
-  command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$ -s \"$ARG3$\"
-}
+        command_name check_tcp_wrapper_sasl
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$ -s \"$ARG3$\"
+       }

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/files/check_wrapper.sh

@@ -70,7 +70,7 @@ real_comp_var=""
 real_component real_comp_var
 
 
-wrapper_output=`exec $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20}`
+wrapper_output=`exec "$@"`
 wrapper_result=$?
 
 if [ "$wrapper_result" == "0" ]; then

+ 10 - 11
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/hadoop-commands.cfg.j2

@@ -42,7 +42,6 @@
 # 'check_cpu' check remote cpu load
 define command {
         command_name    check_cpu
-#        command_line    $USER1$/check_wrapper.sh $USER1$/check_cpu.pl -H $HOSTADDRESS$ -C hadoop -w $ARG1$ -c $ARG2$
         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 %}
@@ -65,7 +64,7 @@ define command{
 
 define command{
         command_name    check_aggregate
-        command_line    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{
@@ -133,16 +132,16 @@ define command{
        }
 
 define command{
-  command_name check_tcp_wrapper
-  command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
-}
+        command_name check_tcp_wrapper
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
+       }
 
 define command{
-  command_name check_checkpoint_time
-  command_line /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_name check_checkpoint_time
+        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  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$ -s \"$ARG3$\"
-}
+        command_name check_tcp_wrapper_sasl
+        command_line  $USER1$/check_wrapper.sh $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$ -s \"$ARG3$\"
+       }