diff --git a/scalarium_ganglia/recipes/configure-client.rb b/scalarium_ganglia/recipes/configure-client.rb index f3bfcad..2bdcb54 100644 --- a/scalarium_ganglia/recipes/configure-client.rb +++ b/scalarium_ganglia/recipes/configure-client.rb @@ -6,7 +6,7 @@ action :nothing end -monitoring_master = node[:scalarium][:roles]['monitoring-master'][:instances].collect{|instance, names| names["private_dns_name"]}.first rescue nil +monitoring_master = node[:scalarium][:roles]['monitoring-master'][:instances].collect{|instance, names| names["private_ip"]}.first rescue nil template "/etc/ganglia/gmond.conf" do source "gmond.conf.erb" diff --git a/scalarium_ganglia/templates/default/gmond.conf.erb b/scalarium_ganglia/templates/default/gmond.conf.erb index e6490d9..d891c08 100644 --- a/scalarium_ganglia/templates/default/gmond.conf.erb +++ b/scalarium_ganglia/templates/default/gmond.conf.erb @@ -21,7 +21,7 @@ globals { * of a tag. If you do not specify a cluster tag, then all will * NOT be wrapped inside of a tag. */ cluster { - name = "<%= @cluster_name.gsub(/[\(\)\[\]]/,'') %>" + name = "<%= @cluster_name.gsub(/[\(\)\[\]\&]/,'') %>" owner = "Scalarium" latlong = "unspecified" url = "unspecified" @@ -40,7 +40,7 @@ udp_send_channel { } <% end %> -<% if @monitoring_master && @monitoring_master == node[:scalarium][:instance][:private_dns_name] %> +<% if @monitoring_master && @monitoring_master == node[:scalarium][:instance][:private_ip] %> udp_recv_channel { port = <%= node[:ganglia][:udp_client_port] %> family = inet4