You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2014/05/14 16:02:16 UTC

[08/15] AMBARI-5747 Remove facter-1.6.10, Ruby, Puppet dependencies from pom.xml and src (dsen)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
deleted file mode 100644
index c527e1f..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/config.pp
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-#
-# 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.
-#
-#
-class hdp-nagios::server::config()
-{
-
-  $host_cfg = $hdp-nagios::params::nagios_host_cfg
-  $nagios_lookup_daemon_str = $hdp::params::nagios_lookup_daemon_strs[$hdp::params::hdp_os_type]
-  
-  hdp-nagios::server::configfile { 'nagios.cfg': conf_dir => $hdp-nagios::params::conf_dir, group => $hdp-nagios::params::nagios_group }
-  hdp-nagios::server::configfile { 'resource.cfg': conf_dir => $hdp-nagios::params::conf_dir, group => $hdp-nagios::params::nagios_group }
-  hdp-nagios::server::configfile { 'hadoop-hosts.cfg': }
-  hdp-nagios::server::configfile { 'hadoop-hostgroups.cfg': }
-  hdp-nagios::server::configfile { 'hadoop-servicegroups.cfg': }
-  hdp-nagios::server::configfile { 'hadoop-services.cfg': }
-  hdp-nagios::server::configfile { 'hadoop-commands.cfg': }
-  hdp-nagios::server::configfile { 'contacts.cfg': }
-  if ($hdp::params::hdp_os_type in ['centos5', 'centos6', 'redhat5', 'redhat6', 'oraclelinux5', 'oraclelinux6']) {
-    hdp-nagios::server::configfile { 'nagios': conf_dir => '/etc/init.d/', mode => '0755', owner => 'root', group => 'root'}
-  }
-
-  hdp-nagios::server::check { 'check_cpu.pl': }
-  hdp-nagios::server::check { 'check_datanode_storage.php': }
-  hdp-nagios::server::check { 'check_aggregate.php': }
-  hdp-nagios::server::check { 'check_hdfs_blocks.php': }
-  hdp-nagios::server::check { 'check_hdfs_capacity.php': }
-  hdp-nagios::server::check { 'check_rpcq_latency.php': }
-  hdp-nagios::server::check { 'check_webui.sh': }
-  hdp-nagios::server::check { 'check_name_dir_status.php': }
-  hdp-nagios::server::check { 'check_oozie_status.sh': }
-  hdp-nagios::server::check { 'check_templeton_status.sh': }
-  hdp-nagios::server::check { 'check_hive_metastore_status.sh': }
-  hdp-nagios::server::check { 'check_hue_status.sh': }
-  hdp-nagios::server::check { 'check_mapred_local_dir_used.sh': }
-  hdp-nagios::server::check { 'check_nodemanager_health.sh': }
-  hdp-nagios::server::check { 'check_namenodes_ha.sh': }
-  hdp-nagios::server::check { 'hdp_nagios_init.php': }
-
-  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']
-}
-
-
-###config file helper
-define hdp-nagios::server::configfile(
-  $owner = $hdp-nagios::params::nagios_user,
-  $group = $hdp::params::user_group,
-  $conf_dir = $hdp-nagios::params::nagios_obj_dir,
-  $mode = undef
-) 
-{
-  
-  hdp::configfile { "${conf_dir}/${name}":
-    component      => 'nagios',
-    owner          => $owner,
-    group          => $group,
-    mode           => $mode
-  }
-
-  
-}
-
-define hdp-nagios::server::check()
-{
-  file { "${hdp-nagios::params::plugins_dir}/${name}":
-    source => "puppet:///modules/hdp-nagios/${name}", 
-    mode => '0755'
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
deleted file mode 100644
index 03d241d..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/server/packages.pp
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-#
-# 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.
-#
-#
-class hdp-nagios::server::packages(
-  $service_state = $hdp::params::cluster_service_state
-)
-{
-  if ($service_state == 'no_op') {
-  } elsif ($service_state in ['uninstalled']) {
-     hdp-nagios::server::package { ['nagios-server','nagios-fping','nagios-plugins','nagios-addons']:
-      ensure => 'uninstalled'
-    }
-  } elsif ($service_state in ['running','stopped','installed_and_configured']) {
-
-  hdp::package { 'perl':
-    ensure      => present,
-    java_needed => false
-  }
-
-  hdp::package { 'perl-Net-SNMP':
-    ensure      => present,
-    java_needed => false
-  }
-
-  hdp::package { 'nagios-plugins': 
-    ensure      => present,
-    java_needed => false
-  }
-  
-  hdp::package { 'nagios-server':
-    ensure      => present,
-    java_needed => false
-  }
-
-  hdp::package { 'nagios-devel': 
-    ensure      => present,
-    java_needed => false
-  }
-  
-  hdp::package { 'nagios-fping': 
-    ensure      => present,
-    java_needed => false
-  }
-  
-  hdp::package { 'nagios-addons': 
-    ensure      => present,
-    java_needed => false
-  }
-  
-  hdp::package { 'nagios-php-pecl-json': 
-    ensure      => present,
-    java_needed => false
-  }
-  
-  
-debug("## state: $service_state")
-  if ($service_state == 'installed_and_configured') {
-    
-    hdp::package::remove_pkg { 'hdp_mon_nagios_addons':
-      package_type => 'hdp_mon_nagios_addons'
-    }
-
-    hdp::package::remove_pkg { 'nagios-plugins':
-      package_type => 'nagios-plugins'
-    }
-
-    exec { "remove_package nagios":
-      path    => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
-      command => "rpm -e --allmatches --nopostun nagios ; true"
-    }
-
-    debug("##Adding removing dep")
-    # Removing conflicting packages. Names of packages being removed are hardcoded and not resolved via hdp::params
-    Hdp::Package::Remove_pkg['hdp_mon_nagios_addons'] -> Hdp::Package::Remove_pkg['nagios-plugins'] -> Exec['remove_package nagios'] -> Hdp::Package['nagios-plugins']
-  }
-
-  Hdp::Package['nagios-plugins'] -> Hdp::Package['nagios-server'] -> Hdp::Package['nagios-devel'] -> Hdp::Package['nagios-fping'] -> Hdp::Package['nagios-addons'] -> Hdp::Package['nagios-php-pecl-json']
-    
-
-} 
-
-}
-
-
-define hdp-nagios::server::package(
-  $ensure = present
-)
-{
-  hdp::package { $name: 
-    ensure      => $ensure,
-    java_needed => false
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/target.pp
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/target.pp b/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/target.pp
deleted file mode 100644
index 4de784f..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/manifests/target.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-#
-# 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.
-#
-#
-class hdp-nagios::target(){}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/contacts.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/contacts.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/contacts.cfg.erb
deleted file mode 100644
index ee6f09e..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/contacts.cfg.erb
+++ /dev/null
@@ -1,91 +0,0 @@
-###############################################################################
-# CONTACTS.CFG - SAMPLE CONTACT/CONTACTGROUP DEFINITIONS
-#
-# Last Modified: 05-31-2007
-#
-# NOTES: This config file provides you with some example contact and contact
-#        group definitions that you can reference in host and service
-#        definitions.
-#       
-#        You don't need to keep these definitions in a separate file from your
-#        other object definitions.  This has been done just to make things
-#        easier to understand.
-#
-###############################################################################
-
-#
-#
-# 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.
-#
-#
-#
-
-
-###############################################################################
-###############################################################################
-#
-# CONTACTS
-#
-###############################################################################
-###############################################################################
-
-# Just one contact defined by default - the Nagios admin (that's you)
-# This contact definition inherits a lot of default values from the 'generic-contact' 
-# template which is defined elsewhere.
-
-define contact{
-        contact_name    <%=scope.function_hdp_template_var("nagios_web_login")%>    ; Short name of user
-        use             generic-contact                                             ; Inherit default values from generic-contact template (defined above)
-        alias           Nagios Admin                                                ; Full name of user
-
-        email                           <%=scope.function_hdp_template_var("nagios_contact")%>	; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
-        }
-
-# Contact which writes all Nagios alerts to the system logger.
-define contact{
-        contact_name                    sys_logger         ; Short name of user
-        use                             generic-contact    ; Inherit default values from generic-contact template (defined above)
-        alias                           System Logger      ; Full name of user
-        host_notifications_enabled      1
-        service_notifications_enabled   1
-        service_notification_period     24x7
-        host_notification_period        24x7
-        service_notification_options    w,u,c,r,s
-        host_notification_options       d,u,r,s
-        can_submit_commands             1
-        retain_status_information       1
-        service_notification_commands   service_sys_logger
-        host_notification_commands      host_sys_logger
-        }
-
-###############################################################################
-###############################################################################
-#
-# CONTACT GROUPS
-#
-###############################################################################
-###############################################################################
-
-# We only have one contact in this simple configuration file, so there is
-# no need to create more than one contact group.
-
-define contactgroup {
-        contactgroup_name       admins
-        alias                   Nagios Administrators
-        members                 <%=scope.function_hdp_template_var("nagios_web_login")%>,sys_logger
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/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
deleted file mode 100644
index e49199b..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-commands.cfg.erb
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-#
-# 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.
-#
-#
-#
-
-<% if scope.function_hdp_template_var("hdp_os_type") != "suse"%>
-# 'check_cpu' check remote cpu load
-define command {
-        command_name    check_cpu
-        command_line    $USER1$/check_cpu.pl -H $HOSTADDRESS$ -C hadoop -w $ARG1$ -c $ARG2$
-       }
-<% end %>
-
-# Check data node storage full 
-define command {
-        command_name    check_datanode_storage
-        command_line    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    php $USER1$/check_hdfs_blocks.php -h $ARG1$ -p $ARG2$ -w $ARG3$ -c $ARG4$ -s $ARG5$ -e $ARG6$ -k $ARG7$ -r $ARG8$ -t $ARG9$ -u $ARG10$
-       }
-
-define command{
-        command_name    check_hdfs_capacity
-        command_line    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    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    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    $USER1$/check_nagios -e $ARG1$ -F $ARG2$ -C $ARG3$ 
-       }
-
-define command{
-        command_name    check_webui
-        command_line    $USER1$/check_webui.sh $ARG1$ $HOSTADDRESS$ $ARG2$
-       }
-
-define command{
-        command_name    check_name_dir_status
-        command_line    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    $USER1$/check_oozie_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
-       }
-
-define command{
-        command_name    check_templeton_status
-        command_line    $USER1$/check_templeton_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
-       }
-
-define command{
-        command_name    check_hive_metastore_status
-        command_line    $USER1$/check_hive_metastore_status.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
-       }
-define command{
-        command_name    check_hue_status
-        command_line    $USER1$/check_hue_status.sh
-       }
-
-define command{
-       command_name    check_mapred_local_dir_used_space
-       command_line    $USER1$/check_mapred_local_dir_used.sh $ARG1$ $ARG2$
-       }
-
-define command{
-       command_name    check_namenodes_ha
-       command_line    $USER1$/check_namenodes_ha.sh $ARG1$ $ARG2$
-       }
-
-define command{
-        command_name    check_nodemanager_health
-        command_line    $USER1$/check_nodemanager_health.sh $HOSTADDRESS$ $ARG1$
-       }
-
-define command{
-        command_name    host_sys_logger
-        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    $USER1$/sys_logger.py $SERVICESTATETYPE$ $SERVICEATTEMPT$ $SERVICESTATE$ "$SERVICEDESC$" "Event Host=$HOSTADDRESS$ Service Description=$SERVICEDESC$($SERVICESTATE$), $SERVICEOUTPUT$ $LONGSERVICEOUTPUT$"
-       }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hostgroups.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hostgroups.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hostgroups.cfg.erb
deleted file mode 100644
index 9bac137..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hostgroups.cfg.erb
+++ /dev/null
@@ -1,20 +0,0 @@
-<% all_hosts = Array.new -%>
-<%scope.function_hdp_template_var("hostgroup_defs").each do |name,info|-%>
-<%members = scope.function_hdp_host(info['host_member_info'])-%>
-<%unless scope.function_hdp_is_empty(members) -%>
-<% all_hosts += [members].flatten-%>
-define hostgroup {
-        hostgroup_name  <%=name%>
-        alias           <%=name%>
-        members         <%=[members].flatten.join(',')%>
-}
-
-<%end-%>
-<%end%>
-<%unless all_hosts.empty?-%>
-define hostgroup {
-        hostgroup_name  all-servers
-        alias           All Servers
-        members         <%=all_hosts.uniq.join(',')%>
-}
-<%end%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hosts.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hosts.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hosts.cfg.erb
deleted file mode 100644
index 4e97548..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-hosts.cfg.erb
+++ /dev/null
@@ -1,16 +0,0 @@
-<%scope.function_hdp_nagios_all_hosts().each do |host|-%>
-define host {
-        alias        <%=host%>
-        host_name    <%=host%>
-        use          linux-server
-        address      <%=host%>
-        check_interval         0.25
-        retry_interval         0.25
-        max_check_attempts     4
-        notifications_enabled     1
-        first_notification_delay  0     # Send notification soon after change in the hard state
-        notification_interval     0     # Send the notification once
-        notification_options      d,u,r
-}
-
-<%end%>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
deleted file mode 100644
index eb382bc..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-servicegroups.cfg.erb
+++ /dev/null
@@ -1,80 +0,0 @@
-<%if scope.function_hdp_nagios_members_exist('namenode') ||
-  scope.function_hdp_nagios_members_exist('snamenode')  ||
-  scope.function_hdp_nagios_members_exist('slaves')-%>
-define servicegroup {
-  servicegroup_name  HDFS
-  alias  HDFS Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('jobtracker') ||
-  scope.function_hdp_nagios_members_exist('historyserver2')-%>
-define servicegroup {
-  servicegroup_name  MAPREDUCE
-  alias  MAPREDUCE Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('resourcemanager') ||
-  scope.function_hdp_nagios_members_exist('nodemanagers') -%>
-define servicegroup {
-  servicegroup_name  YARN
-  alias  YARN Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('flume-servers')-%>
-define servicegroup {
-  servicegroup_name  FLUME
-  alias  FLUME Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('hbasemasters')-%>
-define servicegroup {
-  servicegroup_name  HBASE
-  alias  HBASE Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('oozie-server')-%>
-define servicegroup {
-  servicegroup_name  OOZIE
-  alias  OOZIE Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('webhcat-server')-%>
-define servicegroup {
-  servicegroup_name  WEBHCAT
-  alias  WEBHCAT Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('nagios-server')-%>
-define servicegroup {
-  servicegroup_name  NAGIOS
-  alias  NAGIOS Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('ganglia-server')-%>
-define servicegroup {
-  servicegroup_name  GANGLIA
-  alias  GANGLIA Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('hiveserver')-%>
-define servicegroup {
-  servicegroup_name  HIVE-METASTORE
-  alias  HIVE-METASTORE Checks
-}
-<% end -%>
-<%if scope.function_hdp_nagios_members_exist('zookeeper-servers')-%>
-define servicegroup {
-  servicegroup_name  ZOOKEEPER
-  alias  ZOOKEEPER Checks
-}
-<% end -%>
-define servicegroup {
-  servicegroup_name  AMBARI
-  alias  AMBARI Checks
-}
-<%if scope.function_hdp_nagios_members_exist('hue-server')-%>
-define servicegroup {
-  servicegroup_name  HUE
-  alias  HUE Checks
-}
-<% end -%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d1171b0/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb b/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
deleted file mode 100644
index 6e8acd6..0000000
--- a/ambari-agent/src/main/puppet/modules/hdp-nagios/templates/hadoop-services.cfg.erb
+++ /dev/null
@@ -1,753 +0,0 @@
-#
-#
-# 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.
-#
-#
-
-
-# NAGIOS SERVER Check (status log update)
-<%if scope.function_hdp_nagios_members_exist('nagios-server')-%>
-define service {
-        name                            hadoop-service
-        use                             generic-service
-        notification_options            w,u,c,r,f,s
-        first_notification_delay        0
-        notification_interval           0                 # Send the notification once
-        contact_groups                  admins
-        notifications_enabled           1
-        event_handler_enabled           1
-        register                        0
-}
-
-define service {        
-        hostgroup_name          nagios-server        
-        use                     hadoop-service
-        service_description     NAGIOS::Nagios status log freshness
-        servicegroups           NAGIOS
-        check_command           check_nagios!10!/var/nagios/status.dat!<%=scope.function_hdp_template_var("::hdp-nagios::server::config::nagios_lookup_daemon_str")%>
-        normal_check_interval   5
-        retry_check_interval    0.5
-        max_check_attempts      2
-}
-
-<%if scope.function_hdp_nagios_members_exist('namenode')-%>
-# NAGIOS SERVER HDFS Checks
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HDFS::Percent DataNodes with space available
-        servicegroups           HDFS
-        check_command           check_aggregate!"DATANODE::DataNode space"!10%!30%
-        normal_check_interval   2
-        retry_check_interval    1 
-        max_check_attempts      1
-}
-
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HDFS::Percent DataNodes live
-        servicegroups           HDFS
-        check_command           check_aggregate!"DATANODE::DataNode process"!10%!30%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-<%end-%> #end HDFS if
-<% if scope.function_hdp_nagios_members_exist('namenode') &&
-        (scope.function_hdp_get_major_stack_version([scope.function_hdp_template_var("stack_version")]) >= 2) &&
-        (scope.function_hdp_template_var("::hdp::params::dfs_ha_enabled"))%>
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HDFS::NameNode HA Healthy
-        servicegroups           HDFS
-        check_command           check_namenodes_ha!$HOSTGROUPMEMBERS:namenode$!<%=scope.function_hdp_template_var("::hdp::namenode_port")%>
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      5
-}
-<%end-%> #end HDFS if
-
-
-# AMBARI AGENT Checks
-<%scope.function_hdp_template_var("all_hosts").each_with_index do |hostname, index|-%>
-define service {
-        host_name	        <%=hostname%>
-        use                     hadoop-service
-        service_description     AMBARI::Ambari Agent process
-        servicegroups           AMBARI
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::all_ping_ports")[index]%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-
-<%end-%> #end do loop
-
-# NAGIOS SERVER ZOOKEEPER Checks
-<%if scope.function_hdp_nagios_members_exist('zookeeper-servers')-%>
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     ZOOKEEPER::Percent ZooKeeper Servers live
-        servicegroups           ZOOKEEPER
-        check_command           check_aggregate!"ZOOKEEPER::ZooKeeper Server process"!35%!70%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-<%end-%>
-
-# NAGIOS SERVER HBASE Checks
-<%if scope.function_hdp_nagios_members_exist('hbasemasters')-%>
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HBASE::Percent RegionServers live
-        servicegroups           HBASE
-        check_command           check_aggregate!"REGIONSERVER::RegionServer process"!10%!30%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-<%end-%>
-<%end-%> #end if nagios-server
-
-
-
-# GANGLIA SERVER Checks
-<%if scope.function_hdp_nagios_members_exist('ganglia-server')-%>
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Server process
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Monitor process for Slaves
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_collector_slaves_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Monitor process for NameNode
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_collector_namenode_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-
-<%if scope.function_hdp_nagios_members_exist('jobtracker')-%>
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Monitor process for JobTracker
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_collector_jobtracker_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('hbasemasters')-%>
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Monitor process for HBase Master
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_collector_hbase_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('resourcemanager')-%>
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Monitor process for ResourceManager
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_collector_rm_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('historyserver2')-%>
-define service {
-        hostgroup_name          ganglia-server
-        use                     hadoop-service
-        service_description     GANGLIA::Ganglia Monitor process for HistoryServer
-        servicegroups           GANGLIA
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::ganglia_collector_hs_port")%>!-w 1 -c 1
-        normal_check_interval   0.25
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-<%end-%>
-
-<%end-%> #end if ganglia
-
-<%if scope.function_hdp_nagios_members_exist('snamenode')-%>
-# Secondary namenode checks
-define service {
-        hostgroup_name          snamenode
-        use                     hadoop-service
-        service_description     NAMENODE::Secondary NameNode process
-        servicegroups           HDFS
-        check_command           check_tcp!<%=scope.function_hdp_template_var("snamenode_port")%>!-w 1 -c 1
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('namenode')-%>
-# HDFS Checks
-<% @namenodes = scope.function_hdp_template_var("::hdp::params::namenode_host"); @namenodes.each do |namenode| -%>
-
-define service {
-        host_name               <%= namenode %>
-        use                     hadoop-service
-        service_description     NAMENODE::NameNode edit logs directory status on <%= namenode %>
-        servicegroups           HDFS
-        check_command           check_name_dir_status!<%=scope.function_hdp_template_var("::hdp::namenode_port")%>!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   0.5
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-<% if scope.function_hdp_template_var("hdp_os_type") != "suse"%>
-define service {
-        host_name               <%= namenode %>
-        use                     hadoop-service
-        service_description     NAMENODE::NameNode host CPU utilization on <%= namenode %>
-        servicegroups           HDFS
-        check_command           check_cpu!200%!250%
-        normal_check_interval   5
-        retry_check_interval    2
-        max_check_attempts      5
-}
-<% end %> #end os type
-
-define service {
-        host_name               <%= namenode %>
-        use                     hadoop-service
-        service_description     NAMENODE::NameNode Web UI on <%= namenode %>
-        servicegroups           HDFS
-        check_command           check_webui!namenode!<%=scope.function_hdp_template_var("::hdp::namenode_port")%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-
-define service {
-        host_name               <%= namenode %>
-        use                     hadoop-service
-        service_description     NAMENODE::NameNode process on <%= namenode %>
-        servicegroups           HDFS
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::namenode_metadata_port")%>!-w 1 -c 1
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-
-define service {
-        host_name               <%= namenode %>
-        use                     hadoop-service
-        service_description     HDFS::NameNode RPC latency on <%= namenode %>
-        servicegroups           HDFS
-        check_command           check_rpcq_latency!NameNode!<%=scope.function_hdp_template_var("::hdp::namenode_port")%>!3000!5000!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   5
-        retry_check_interval    1
-        max_check_attempts      5
-}
-
-
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HDFS::Blocks health
-        servicegroups           HDFS
-        check_command           check_hdfs_blocks!$HOSTGROUPMEMBERS:namenode$!<%=scope.function_hdp_template_var("::hdp::namenode_port")%>!0%!0%!<%=scope.function_hdp_template_var("::hdp-nagios::params::nn_metrics_property")%>!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   2
-        retry_check_interval    1 
-        max_check_attempts      1
-}
-
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HDFS::HDFS capacity utilization
-        servicegroups           HDFS
-        check_command           check_hdfs_capacity!$HOSTGROUPMEMBERS:namenode$!<%=scope.function_hdp_template_var("::hdp::namenode_port")%>!80%!90%!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   10
-        retry_check_interval    1 
-        max_check_attempts      1
-}
-<% end -%> #end do loop
-<% end -%> #end if HDFS (namenode)
-
-# MAPREDUCE Checks
-<%if scope.function_hdp_nagios_members_exist('jobtracker')-%>
-define service {
-        hostgroup_name          jobtracker
-        use                     hadoop-service
-        service_description     JOBTRACKER::JobTracker Web UI
-        servicegroups           MAPREDUCE
-        check_command           check_webui!jobtracker!<%=scope.function_hdp_template_var("::hdp::jtnode_port")%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-
-define service {
-        hostgroup_name          jobtracker
-        use                     hadoop-service
-        service_description     JOBTRACKER::HistoryServer Web UI
-        servicegroups           MAPREDUCE
-        check_command           check_webui!jobhistory!<%=scope.function_hdp_template_var("::hdp::jobhistory_port")%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-<% if scope.function_hdp_template_var("hdp_os_type") != "suse"%>
-define service {
-        hostgroup_name          jobtracker
-        use                     hadoop-service
-        service_description     JOBTRACKER::JobTracker CPU utilization
-        servicegroups           MAPREDUCE
-        check_command           check_cpu!200%!250%
-        normal_check_interval   5
-        retry_check_interval    2 
-        max_check_attempts      5
-}
-<% end %>
-
-define service {
-        hostgroup_name          jobtracker
-        use                     hadoop-service
-        use                     hadoop-service
-        service_description     JOBTRACKER::JobTracker process
-        servicegroups           MAPREDUCE
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::jtnode_port")%>!-w 1 -c 1
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-
-define service {
-        hostgroup_name          jobtracker
-        use                     hadoop-service
-        service_description     MAPREDUCE::JobTracker RPC latency
-        servicegroups           MAPREDUCE
-        check_command           check_rpcq_latency!JobTracker!<%=scope.function_hdp_template_var("::hdp::jtnode_port")%>!3000!5000!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   5
-        retry_check_interval    1 
-        max_check_attempts      5
-}
-
-<%end-%> #end if MapReduce
-
-<%if scope.function_hdp_nagios_members_exist('tasktracker-servers')-%>
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     MAPREDUCE::Percent TaskTrackers live
-        servicegroups           MAPREDUCE
-        check_command           check_aggregate!"TASKTRACKER::TaskTracker process"!10%!30%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-
-# MAPREDUCE::TASKTRACKER Checks 
-define service {
-        hostgroup_name          tasktracker-servers
-        use                     hadoop-service
-        service_description     TASKTRACKER::TaskTracker process
-        servicegroups           MAPREDUCE
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::tasktracker_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-# MAPREDUCE::TASKTRACKER Mapreduce local dir used space
-define service {
-        hostgroup_name          tasktracker-servers
-        use                     hadoop-service
-        service_description     ::MapReduce local dir space
-        servicegroups           MAPREDUCE
-        check_command           check_mapred_local_dir_used_space!<%=scope.function_hdp_default("::hdp::mapred-site/mapred.local.dir")%>!85%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-
-<%end-%>
-
-
-<%if scope.function_hdp_nagios_members_exist('resourcemanager')-%>
-# YARN::RESOURCEMANAGER Checks 
-define service {
-        hostgroup_name          resourcemanager
-        use                     hadoop-service
-        service_description     RESOURCEMANAGER::ResourceManager Web UI
-        servicegroups           YARN
-        check_command           check_webui!resourcemanager!<%=scope.function_hdp_template_var("::hdp::rm_port")%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-
-<% if scope.function_hdp_template_var("hdp_os_type") != "suse"%>
-define service {
-        hostgroup_name          resourcemanager
-        use                     hadoop-service
-        service_description     RESOURCEMANAGER::ResourceManager CPU utilization
-        servicegroups           YARN
-        check_command           check_cpu!200%!250%
-        normal_check_interval   5
-        retry_check_interval    2 
-        max_check_attempts      5
-}
-<% end %>
-
-define service {
-        hostgroup_name          resourcemanager
-        use                     hadoop-service
-        service_description     RESOURCEMANAGER::ResourceManager RPC latency
-        servicegroups           YARN
-        check_command           check_rpcq_latency!ResourceManager!<%=scope.function_hdp_template_var("::hdp::rm_port")%>!3000!5000!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   5
-        retry_check_interval    1 
-        max_check_attempts      5
-}
-
-define service {
-        hostgroup_name          resourcemanager
-        use                     hadoop-service
-        service_description     RESOURCEMANAGER::ResourceManager process
-        servicegroups           YARN
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::rm_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-<% end %>
-
-<%if scope.function_hdp_nagios_members_exist('nodemanagers')-%>
-# YARN::NODEMANAGER Checks
-define service {
-        hostgroup_name          nodemanagers
-        use                     hadoop-service
-        service_description     NODEMANAGER::NodeManager process
-        servicegroups           YARN
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::nm_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-define service {
-        hostgroup_name          nodemanagers
-        use                     hadoop-service
-        service_description     NODEMANAGER::NodeManager health
-        servicegroups           YARN
-        check_command           check_nodemanager_health!<%=scope.function_hdp_template_var("::hdp::nm_port")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     NODEMANAGER::Percent NodeManagers live
-        servicegroups           YARN
-        check_command           check_aggregate!"NODEMANAGER::NodeManager process"!10%!30%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-<% end %>
-
-<%if scope.function_hdp_nagios_members_exist('historyserver2')-%>
-# MAPREDUCE::JOBHISTORY Checks
-define service {
-        hostgroup_name          historyserver2
-        use                     hadoop-service
-        service_description     JOBHISTORY::HistoryServer Web UI
-        servicegroups           MAPREDUCE
-        check_command           check_webui!historyserver2!<%=scope.function_hdp_template_var("::hdp::hs_port")%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-
-<% if scope.function_hdp_template_var("hdp_os_type") != "suse"%>
-define service {
-        hostgroup_name          historyserver2
-        use                     hadoop-service
-        service_description     JOBHISTORY::HistoryServer CPU utilization
-        servicegroups           MAPREDUCE
-        check_command           check_cpu!200%!250%
-        normal_check_interval   5
-        retry_check_interval    2 
-        max_check_attempts      5
-}
-<% end %>
-
-define service {
-        hostgroup_name          historyserver2
-        use                     hadoop-service
-        service_description     JOBHISTORY::HistoryServer RPC latency
-        servicegroups           MAPREDUCE
-        check_command           check_rpcq_latency!JobHistoryServer!<%=scope.function_hdp_template_var("::hdp::hs_port")%>!3000!5000!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   5
-        retry_check_interval    1 
-        max_check_attempts      5
-}
-
-define service {
-        hostgroup_name          historyserver2
-        use                     hadoop-service
-        service_description     JOBHISTORY::HistoryServer process
-        servicegroups           MAPREDUCE
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::hs_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-<% end %>
-
-<%if scope.function_hdp_nagios_members_exist('journalnodes')-%>
-# Journalnode checks
-define service {
-        hostgroup_name          journalnodes
-        use                     hadoop-service
-        service_description     JOURNALNODE::JournalNode process
-        servicegroups           HDFS
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::journalnode_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-<%if scope.function_hdp_template_var("::hdp::params::dfs_ha_enabled")-%>
-define service {
-        hostgroup_name          nagios-server
-        use                     hadoop-service
-        service_description     HDFS::Percent JournalNodes live
-        servicegroups           HDFS
-        check_command           check_aggregate!"JOURNALNODE::JournalNode process"!33%!50%
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      3
-}
-<%end-%>
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('slaves')-%>
-# HDFS::DATANODE Checks
-define service {
-        hostgroup_name          slaves
-        use                     hadoop-service
-        service_description     DATANODE::DataNode process
-        servicegroups           HDFS
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::datanode_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-define service {
-        hostgroup_name          slaves
-        use                     hadoop-service
-        service_description     DATANODE::DataNode space
-        servicegroups           HDFS
-        check_command           check_datanode_storage!<%=scope.function_hdp_template_var("::hdp::datanode_port")%>!90%!90%!<%=scope.function_hdp_template_var("::hdp::params::hadoop_ssl_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("::hdp::params::kinit_path_local")%>!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>
-        normal_check_interval   5
-        retry_check_interval    1
-        max_check_attempts      2
-}
-
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('flume-servers')-%>
-# FLUME Checks
-define service {
-        hostgroup_name          flume-servers
-        use                     hadoop-service
-        service_description     FLUME::Flume Agent process
-        servicegroups           FLUME
-        check_command           check_tcp!<%=scope.function_hdp_template_var("flume_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-<%end-%>
-
-
-<%if scope.function_hdp_nagios_members_exist('zookeeper-servers')-%>
-# ZOOKEEPER Checks
-define service {
-        hostgroup_name          zookeeper-servers
-        use                     hadoop-service
-        service_description     ZOOKEEPER::ZooKeeper Server process
-        servicegroups           ZOOKEEPER
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::clientPort")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('hbasemasters')-%>
-# HBASE::REGIONSERVER Checks
-define service {
-        hostgroup_name          region-servers
-        use                     hadoop-service
-        service_description     REGIONSERVER::RegionServer process
-        servicegroups           HBASE
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::hbase_rs_port")%>!-w 1 -c 1
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-
-# HBASE:: MASTER Checks
-# define service {
-#         hostgroup_name          hbasemasters
-#         use                     hadoop-service
-#         service_description     HBASEMASTER::HBase Master Web UI
-#         servicegroups           HBASE
-#         check_command           check_webui!hbase!<%=scope.function_hdp_template_var("::hdp::hbase_master_port")%>
-#         normal_check_interval   1
-#         retry_check_interval    1
-#         max_check_attempts      3
-# }
-<% @hbasemasters = scope.function_hdp_template_var("::hdp::params::hbase_master_hosts"); @hbasemasters.each do |hbasemaster| -%>
-<% if scope.function_hdp_template_var("hdp_os_type") != "suse"%>
-define service {
-        host_name               <%= hbasemaster %>
-        use                     hadoop-service
-        service_description     HBASEMASTER::HBase Master CPU utilization on <%= hbasemaster %>
-        servicegroups           HBASE
-        check_command           check_cpu!200%!250%
-        normal_check_interval   5
-        retry_check_interval    2 
-        max_check_attempts      5
-}
-<% end %> #end if suse
-define service {
-        host_name               <%= hbasemaster %>
-        use                     hadoop-service
-        service_description     HBASEMASTER::HBase Master process on <%= hbasemaster %>
-        servicegroups           HBASE
-        check_command           check_tcp!<%=scope.function_hdp_template_var("::hdp::hbase_master_rpc_port")%>!-w 1 -c 1
-        normal_check_interval   0.5
-        retry_check_interval    0.25
-        max_check_attempts      4
-}
-<%end-%> #end do loop
-<%end-%> #end if Hbase
-
-<%if scope.function_hdp_nagios_members_exist('hiveserver')-%>
-# HIVE Metastore check
-define service {
-        hostgroup_name          hiveserver
-        use                     hadoop-service
-        service_description     HIVE-METASTORE::Hive Metastore status
-        servicegroups           HIVE-METASTORE
-        <%if scope.function_hdp_template_var("::hdp::params::security_enabled")-%>
-        check_command           check_hive_metastore_status!<%=scope.function_hdp_template_var("::hive_metastore_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
-        <%else-%>
-        check_command           check_hive_metastore_status!<%=scope.function_hdp_template_var("::hive_metastore_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!false
-        <%end-%>
-        normal_check_interval   0.5
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-<%end-%>
-<%if scope.function_hdp_nagios_members_exist('oozie-server')-%>
-# Oozie check
-define service {
-        hostgroup_name          oozie-server
-        use                     hadoop-service
-        service_description     OOZIE::Oozie Server status
-        servicegroups           OOZIE
-        <%if scope.function_hdp_template_var("::hdp::params::security_enabled")-%>
-        check_command           check_oozie_status!<%=scope.function_hdp_template_var("::hdp::oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
-        <%else-%>
-        check_command           check_oozie_status!<%=scope.function_hdp_template_var("::hdp::oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!false
-        <%end-%>
-        normal_check_interval   1
-        retry_check_interval    1
-        max_check_attempts      3
-}
-<%end-%>
-<%if scope.function_hdp_nagios_members_exist('webhcat-server')-%>
-# WEBHCAT check
-define service {
-        hostgroup_name          webhcat-server
-        use                     hadoop-service
-        service_description     WEBHCAT::WebHCat Server status
-        servicegroups           WEBHCAT 
-        <%if scope.function_hdp_template_var("::hdp::params::security_enabled")-%>
-        check_command           check_templeton_status!<%=scope.function_hdp_template_var("::hdp::templeton_port")%>!v1!<%=scope.function_hdp_template_var("::hdp::params::security_enabled")%>!<%=scope.function_hdp_template_var("nagios_keytab_path")%>!<%=scope.function_hdp_template_var("nagios_principal_name")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>
-        <%else-%>
-        check_command           check_templeton_status!<%=scope.function_hdp_template_var("::hdp::templeton_port")%>!v1!false
-        <%end-%>
-        normal_check_interval   1
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-<%end-%>
-
-<%if scope.function_hdp_nagios_members_exist('hue-server')-%>
-define service {
-        hostgroup_name          hue-server
-        use                     hadoop-service
-        service_description     HUE::Hue Server status
-        servicegroups           HUE
-        check_command           check_hue_status
-        normal_check_interval   100
-        retry_check_interval    0.5
-        max_check_attempts      3
-}
-<%end-%>
-