You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2014/09/19 19:19:13 UTC

[05/29] git commit: AMBARI-7379. Add ability for Ganglia to create arbitrary clusters for metrics collection

AMBARI-7379. Add ability for Ganglia to create arbitrary clusters for metrics collection


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

Branch: refs/heads/branch-alerts-dev
Commit: 1498061ee682e92f60b82ce496f7e25fc5ff474b
Parents: 5c24d29
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Thu Sep 18 13:30:16 2014 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Thu Sep 18 13:30:16 2014 -0700

----------------------------------------------------------------------
 .../HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml | 2 +-
 .../HDP/2.0.6/services/GANGLIA/package/scripts/params.py     | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1498061e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
index 3328acf..59d607a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/configuration/ganglia-env.xml
@@ -71,7 +71,7 @@
   <property>
     <name>additional_clusters</name>
     <value> </value>
-    <description>Add additional desired Ganglia metrics cluster in the form "name1:port1,name2:port2". Ensure that the names and ports are unique across all cluster and ports are available on ganglia server host. Ambari has reserved ports 8667-8669 within its own pool.</description>
+    <description>Add additional desired Ganglia metrics cluster in the form "name1,port1,name2,port2". Ensure that the names and ports are unique across all cluster and ports are available on ganglia server host. Ambari has reserved ports 8667-8669 within its own pool.</description>
   </property>
 
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1498061e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
index bf36b93..a00f7b1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
@@ -37,9 +37,11 @@ if gmond_add_clusters_str and gmond_add_clusters_str.isspace():
 
 gmond_app_strs = [] if gmond_add_clusters_str is None else gmond_add_clusters_str.split(',')
 gmond_apps = []
-for x in gmond_app_strs:
-  a,b = x.strip().split(':')
-  gmond_apps.append((a.strip(),b.strip()))
+
+i = 0
+while i < len(gmond_app_strs):
+  gmond_apps.append((gmond_app_strs[i].strip(), gmond_app_strs[i+1].strip()))
+  i = i + 2
 
 if System.get_instance().os_family == "ubuntu":
   gmond_service_name = "ganglia-monitor"