Updated Branches:
  refs/heads/trunk 0204583f0 -> 045c8b96a

AMBARI-3160. WebHCat alert does not nave any description (Vitaly Brodetskyi via 
dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 045c8b96a0fb0cd5c02570ac9e856544ec73953b
Parents: 0204583
Author: Lisnichenko Dmitro <[email protected]>
Authored: Tue Sep 10 19:11:38 2013 +0300
Committer: Lisnichenko Dmitro <[email protected]>
Committed: Tue Sep 10 19:11:38 2013 +0300

----------------------------------------------------------------------
 .../puppet/modules/hdp-nagios/files/check_templeton_status.sh     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/045c8b96/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_templeton_status.sh
----------------------------------------------------------------------
diff --git 
a/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_templeton_status.sh
 
b/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_templeton_status.sh
index 79424be..7fbc4c4 100644
--- 
a/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_templeton_status.sh
+++ 
b/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_templeton_status.sh
@@ -36,7 +36,8 @@ if [[ "$SEC_ENABLED" == "true" ]]; then
 fi
 regex="^.*\"status\":\"ok\".*<status_code:200>$"
 out=`curl --negotiate -u : -s -w '<status_code:%{http_code}>' 
http://$HOST:$PORT/templeton/$VERSION/status 2>&1`
-if [[ $out =~ $regex ]]; then 
+if [[ $out =~ $regex ]]; then
+  out=`echo "$out" | sed -e 's/{/[/g' | sed -e 's/}/]/g'` 
   echo "OK: WebHCat Server status [$out]";
   exit 0;
 fi

Reply via email to