Sha256: f9a02b2b93deef168eb654a86f3ef6e3b59e152b99586d7d35e9e79fdbddd456

Contents?: true

Size: 650 Bytes

Versions: 9

Compression:

Stored size: 650 Bytes

Contents

<%
  @path = '/etc/collectd/conf.d/collectd-ping.conf'

  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

  @skip = (ping_hosts.size == 0)
%>

LoadPlugin ping
<Plugin "ping">
  <% ping_hosts.each do |h| %>
  Host "<%= h %>"
  <% end %>
</Plugin>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubber-2.0.2 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.1 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0.pre12 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0.pre11 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0.pre10 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0.pre9 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0.pre8 templates/collectd/config/rubber/role/collectd/collectd-ping.conf
rubber-2.0.0.pre7 templates/collectd/config/rubber/role/collectd/collectd-ping.conf