templates/collectd/config/rubber/role/collectd/collectd.conf in rubber-2.0.0.pre5 vs templates/collectd/config/rubber/role/collectd/collectd.conf in rubber-2.0.0.pre6
- old
+ new
@@ -62,8 +62,30 @@
Exec <%= rubber_env.app_user %> "/bin/bash" "-l" "-c" "cd <%= "/mnt/#{rubber_env.app_name}-#{Rubber.env}/current" %> && bundle exec <%= rubber_env.rubber_collectd_runner %>"
</Plugin>
<% end %>
+<%
+ ping_hosts = []
+ if rubber_instances[rubber_env.host].role_names.include?('graphite_server')
+ # monitor all servers from graphite_server
+ ping_hosts = rubber_instances.collect {|ic| ic.full_name }.select {|h| h != rubber_env.full_host }
+ elsif rubber_instances[rubber_env.host].role_names.include?('web_tools')
+ # monitor just graphite_server from tools
+ ping_hosts = [rubber_instances.for_role('graphite_server').first.full_name]
+ end
+%>
+
+<% if ping_hosts.size > 0 %>
+
+ LoadPlugin ping
+ <Plugin "ping">
+ <% ping_hosts.each do |h| %>
+ Host "<%= h %>"
+ <% end %>
+ </Plugin>
+
+<% end %>
+
Include "/etc/collectd/conf.d/*.conf"
Include "/etc/collectd/thresholds.d/*.conf"
Include "/etc/collectd/filters.d/*.conf"