templates/agent-conf.d/redisdb.yaml.erb (26 lines of code) (raw):
#
# MANAGED BY PUPPET
#
init_config:
instances:
<% @_ports.each do |port| -%>
- host: <%= @host %>
port: <%= port %>
warn_on_missing_keys: <%= @warn_on_missing_keys %>
command_stats: <%= @command_stats %>
<% if @password.empty? %># <%end %>password: <%= @password %>
# unix_socket_path: /var/run/redis/redis.sock # optional, can be used in lieu of host/port
<% if @slowlog_max_len.empty? %># <%end %>slowlog-max-len: <%= @slowlog_max_len %>
<% unless @tags.empty? -%>
tags: # Optional
<% @tags.each do |tag| -%>
- <%= tag %>
<% end -%>
<% end -%>
<% unless @keys.empty? -%>
keys: # check the length of these keys
<% @keys.each do |key| -%>
- <%= key %>
<% end -%>
<% end -%>
<% end -%>