Author: swagle
Date: Fri Apr 12 18:43:20 2013
New Revision: 1467407
URL: http://svn.apache.org/r1467407
Log:
AMBARI-1914. Add Nagios alerts for Hue service. (swagle)
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_hue_status.sh
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Apr 12 18:43:20 2013
@@ -11,6 +11,8 @@ Trunk (unreleased changes):
INCOMPATIBLE CHANGES
NEW FEATURES
+
+ AMBARI-1914. Add Nagios alerts for Hue service. (swagle)
AMBARI-1895. Refactor ajax requests. (srimanth)
Added:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_hue_status.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_hue_status.sh?rev=1467407&view=auto
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_hue_status.sh
(added)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/files/check_hue_status.sh
Fri Apr 12 18:43:20 2013
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+#
+#
+# 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.
+#
+#
+
+status=`/etc/init.d/hue status 2>&1`
+
+if [[ "$?" -ne 0 ]]; then
+ echo "WARNING: Hue is stopped";
+ exit 1;
+fi
+
+echo "OK: Hue is running";
+exit 0;
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/params.pp
Fri Apr 12 18:43:20 2013
@@ -61,6 +61,7 @@ class hdp-nagios::params() inherits hdp:
hiveserver => {host_member_info => 'hive_server_host'},
region-servers => {host_member_info => 'hbase_rs_hosts'},
oozie-server => {host_member_info => 'oozie_server'},
- webhcat-server => {host_member_info => 'webhcat_server_host'}
+ webhcat-server => {host_member_info => 'webhcat_server_host'},
+ hue-server => {host_member_info => 'hue_server_host'}
}
}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
Fri Apr 12 18:43:20 2013
@@ -45,6 +45,7 @@ class hdp-nagios::server::config()
hdp-nagios::server::check { 'check_templeton_status.sh': }
hdp-nagios::server::check { 'check_hive_metastore_status.sh': }
hdp-nagios::server::check { 'check_ambari_agent_status.sh': }
+ hdp-nagios::server::check { 'check_hue_status.sh': }
anchor{'hdp-nagios::server::config::begin':} ->
Hdp-nagios::Server::Configfile<||> -> anchor{'hdp-nagios::server::config::end':}
Anchor['hdp-nagios::server::config::begin'] -> Hdp-nagios::Server::Check<||>
-> Anchor['hdp-nagios::server::config::end']
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
Fri Apr 12 18:43:20 2013
@@ -87,3 +87,7 @@ define command{
command_name check_ambari_agent_status
command_line $USER1$/check_ambari_agent_status.sh
}
+define command{
+ command_name check_hue_status
+ command_line $USER1$/check_hue_status.sh
+ }
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
Fri Apr 12 18:43:20 2013
@@ -37,4 +37,8 @@ define servicegroup {
define servicegroup {
servicegroup_name AMBARI
alias AMBARI Checks
-}
\ No newline at end of file
+}
+define servicegroup {
+ servicegroup_name HUE
+ alias HUE Checks
+}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
Fri Apr 12 18:43:20 2013
@@ -483,3 +483,14 @@ define service {
max_check_attempts 3
}
<%end-%>
+
+define service {
+ hostgroup_name hue-server
+ use hadoop-service
+ service_description HUE::Hue Server status check
+ servicegroups HUE
+ check_command check_hue_status
+ normal_check_interval 100
+ retry_check_interval 0.5
+ max_check_attempts 3
+}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp?rev=1467407&r1=1467406&r2=1467407&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/params.pp
Fri Apr 12 18:43:20 2013
@@ -56,6 +56,7 @@ class hdp::params()
$oozie_server = hdp_default("oozie_server", "")
$webhcat_server_host = hdp_default("webhcat_server_host", "")
$gateway_host = hdp_default("gateway_host")
+ $hue_server_host = hdp_default("hue_server_host", "")
$nagios_server_host = hdp_default("nagios_server_host")
$ganglia_server_host = hdp_default("ganglia_server_host")