Author: swagle
Date: Tue Apr 30 00:51:51 2013
New Revision: 1477434
URL: http://svn.apache.org/r1477434
Log:
AMBARI-2051. Remove hard-coded ports from agent scripts - Nagios. (swagle)
Modified:
incubator/ambari/trunk/CHANGES.txt
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/init.pp
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1477434&r1=1477433&r2=1477434&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Apr 30 00:51:51 2013
@@ -815,6 +815,8 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2051. Remove hard-coded ports from agent scripts - Nagios. (swagle)
+
AMBARI-2045. Add Unit test to verify, client re-install for install failed
client. (swagle)
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=1477434&r1=1477433&r2=1477434&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
Tue Apr 30 00:51:51 2013
@@ -124,7 +124,7 @@ define service {
use hadoop-service
service_description GANGLIA::Ganglia [gmetad] process down
servicegroups GANGLIA
- check_command check_tcp!8651!-w 1 -c 1
+ check_command
check_tcp!<%=scope.function_hdp_template_var("ganglia_port")%>!-w 1 -c 1
normal_check_interval 0.25
retry_check_interval 0.25
max_check_attempts 4
@@ -135,7 +135,7 @@ define service {
use hadoop-service
service_description GANGLIA::Ganglia Collector [gmond] process
down alert for slaves
servicegroups GANGLIA
- check_command check_tcp!8660!-w 1 -c 1
+ check_command
check_tcp!<%=scope.function_hdp_template_var("ganglia_collector_slaves_port")%>!-w
1 -c 1
normal_check_interval 0.25
retry_check_interval 0.25
max_check_attempts 4
@@ -146,7 +146,7 @@ define service {
use hadoop-service
service_description GANGLIA::Ganglia Collector [gmond] process
down alert for NameNode
servicegroups GANGLIA
- check_command check_tcp!8661!-w 1 -c 1
+ check_command
check_tcp!<%=scope.function_hdp_template_var("ganglia_collector_namenode_port")%>!-w
1 -c 1
normal_check_interval 0.25
retry_check_interval 0.25
max_check_attempts 4
@@ -157,7 +157,7 @@ define service {
use hadoop-service
service_description GANGLIA::Ganglia Collector [gmond] process
down alert for JobTracker
servicegroups GANGLIA
- check_command check_tcp!8662!-w 1 -c 1
+ check_command
check_tcp!<%=scope.function_hdp_template_var("ganglia_collector_jobtracker_port")%>!-w
1 -c 1
normal_check_interval 0.25
retry_check_interval 0.25
max_check_attempts 4
@@ -169,7 +169,7 @@ define service {
use hadoop-service
service_description GANGLIA::Ganglia Collector [gmond] process
down alert for HBase Master
servicegroups GANGLIA
- check_command check_tcp!8663!-w 1 -c 1
+ check_command
check_tcp!<%=scope.function_hdp_template_var("ganglia_collector_hbase_port")%>!-w
1 -c 1
normal_check_interval 0.25
retry_check_interval 0.25
max_check_attempts 4
@@ -231,7 +231,7 @@ define service {
use hadoop-service
service_description NAMENODE::NameNode process down
servicegroups HDFS
- check_command check_tcp!8020!-w 1 -c 1
+ check_command
check_tcp!<%=scope.function_hdp_template_var("namenode_metadata_port")%>!-w 1
-c 1
normal_check_interval 0.5
retry_check_interval 0.25
max_check_attempts 3
@@ -377,7 +377,7 @@ define service {
use hadoop-service
service_description ZOOKEEPER::ZooKeeper Server process down
servicegroups ZOOKEEPER
- check_command check_tcp!2181!-w 1 -c 1
+ 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
@@ -440,9 +440,9 @@ define service {
service_description HIVE-METASTORE::Hive Metastore status check
servicegroups HIVE-METASTORE
<%if scope.function_hdp_template_var("security_enabled")-%>
- check_command
check_hive_metastore_status!9083!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
+ 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("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
<%else-%>
- check_command
check_hive_metastore_status!9083!<%=scope.function_hdp_template_var("java64_home")%>!false
+ 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
@@ -457,9 +457,9 @@ define service {
service_description OOZIE::Oozie Server status check
servicegroups OOZIE
<%if scope.function_hdp_template_var("security_enabled")-%>
- check_command
check_oozie_status!11000!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
+ check_command
check_oozie_status!<%=scope.function_hdp_template_var("oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
<%else-%>
- check_command
check_oozie_status!11000!<%=scope.function_hdp_template_var("java64_home")%>!false
+ check_command
check_oozie_status!<%=scope.function_hdp_template_var("oozie_server_port")%>!<%=scope.function_hdp_template_var("java64_home")%>!false
<%end-%>
normal_check_interval 1
retry_check_interval 1
@@ -474,9 +474,9 @@ define service {
service_description WEBHCAT::WebHCat Server status check
servicegroups WEBHCAT
<%if scope.function_hdp_template_var("security_enabled")-%>
- check_command
check_templeton_status!50111!v1!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
+ check_command
check_templeton_status!<%=scope.function_hdp_template_var("templeton_port")%>!v1!true!<%=scope.function_hdp_template_var("keytab_path")%>/<%=scope.function_hdp_template_var("nagios_user")%>.headless.keytab!<%=scope.function_hdp_template_var("nagios_user")%>!<%=scope.function_hdp_template_var("kinit_path_local")%>/"/usr/bin/kinit"
<%else-%>
- check_command check_templeton_status!50111!v1!false
+ check_command
check_templeton_status!<%=scope.function_hdp_template_var("templeton_port")%>!v1!false
<%end-%>
normal_check_interval 1
retry_check_interval 0.5
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp?rev=1477434&r1=1477433&r2=1477434&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp/manifests/init.pp
Tue Apr 30 00:51:51 2013
@@ -56,6 +56,18 @@ class hdp(
$hbase_master_port = hdp_default("hbase-site/hbase.master.info.port","60010")
$hbase_rs_port =
hdp_default("hbase-site/hbase.regionserver.info.port","60030")
+ $ganglia_port = hdp_default("ganglia_port","8651")
+ $ganglia_collector_slaves_port =
hdp_default("ganglia_collector_slaves_port","8660")
+ $ganglia_collector_namenode_port =
hdp_default("ganglia_collector_namenode_port","8661")
+ $ganglia_collector_jobtracker_port =
hdp_default("ganglia_collector_jobtracker_port","8662")
+ $ganglia_collector_hbase_port =
hdp_default("ganglia_collector_hbase_port","8663")
+
+ $oozie_server_port = hdp_default("oozie_server_port","11000")
+
+ $templeton_port = hdp_default("webhcat-site/templeton.port","50111")
+
+ $namenode_metadata_port = hdp_default("namenode_metadata_port","8020")
+
#TODO: think not needed and also there seems to be a puppet bug around this
and ldap
class { 'hdp::snmp': service_state => 'running'}