Updated Branches: refs/heads/trunk b01e9def8 -> 248e54d34
AMBARI-3232. NameNode edit logs directory status" alert shows as Unknown right after a cluster install. (odiachenko) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/248e54d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/248e54d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/248e54d3 Branch: refs/heads/trunk Commit: 248e54d34820cbf48686a703ecdc62ba2ef64164 Parents: b01e9de Author: Oleksandr Diachenko <[email protected]> Authored: Fri Sep 13 23:04:46 2013 +0300 Committer: Oleksandr Diachenko <[email protected]> Committed: Fri Sep 13 23:05:20 2013 +0300 ---------------------------------------------------------------------- .../modules/hdp-nagios/files/check_name_dir_status.php | 8 +++----- .../modules/hdp-nagios/templates/hadoop-commands.cfg.erb | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/248e54d3/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_name_dir_status.php ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_name_dir_status.php b/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_name_dir_status.php index 4430f8b..a60fca8 100644 --- a/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_name_dir_status.php +++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_name_dir_status.php @@ -24,11 +24,9 @@ include "hdp_nagios_init.php"; - $options = getopt ("h:p:k:r:t:s:"); - if (!array_key_exists('h', $options) || !array_key_exists('p', $options) - || !array_key_exists('k', $options) || !array_key_exists('r', $options) - || !array_key_exists('t', $options) || !array_key_exists('s', $options) - ) { + $options = getopt("h:p:k::r::t::s::"); + //Check only for mandatory options + if (!array_key_exists('h', $options) || !array_key_exists('p', $options)) { usage(); exit(3); } http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/248e54d3/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb index 32c7348..7a8e293 100644 --- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb +++ b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb @@ -66,7 +66,7 @@ define command{ define command{ command_name check_name_dir_status - command_line php $USER1$/check_name_dir_status.php -h $HOSTADDRESS$ -p $ARG1$ -k $ARG2$ -r $ARG3$ -t $ARG4$ -s $ARG5$ + command_line php $USER1$/check_name_dir_status.php -h $HOSTADDRESS$ -p $ARG1$ -k$ARG2$ -r$ARG3$ -t$ARG4$ -s$ARG5$ } define command{
