diff options
author | micah <micah@muck.riseup.net> | 2013-03-20 18:25:28 -0400 |
---|---|---|
committer | micah <micah@muck.riseup.net> | 2013-03-20 18:25:28 -0400 |
commit | c9748747c5c755443d80445a9a6c3f5d2ab3bc7f (patch) | |
tree | 65887003b9bceefd7a6ba3e3692b9a6f08373304 /templates/client.erb | |
parent | 149a78e7a8465da97f8ea267cd6a75e3bcdefe4d (diff) | |
parent | f79f662bedbbd75c7e2022da282ba48c1b323e90 (diff) |
Merge branch 'immerda/master'
Conflicts:
files/plugins/xen-cpu
templates/munin-node.conf.Debian.squeeze
Diffstat (limited to 'templates/client.erb')
-rw-r--r-- | templates/client.erb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/templates/client.erb b/templates/client.erb index 15e05c6..ba03da5 100644 --- a/templates/client.erb +++ b/templates/client.erb @@ -1,19 +1,24 @@ <% # Downcase all information - dom = domain.downcase - host = hostname.downcase + dom = scope.lookupvar('::domain').downcase + h = scope.lookupvar('::hostname').downcase %> ### Munin client from Puppet template # Domain: <%= dom %> -# Registered on: <%= host %> +# Registered on: <%= h %> # Type: <%= client_type %> <% if description != 'absent' -%> # Description: <%= description.gsub!(/\n/, ' ') %> <% end -%> [<%= fhost.downcase %>] - address <%= munin_host_real %> - port <%= munin_port_real %> +<% if use_ssh -%> + address ssh://<%= host %>/bin/nc localhost <%= port %> +<% else -%> + address <%= host %> + port <%= port %> +<% end -%> <% if config -%><% config.each do |val| -%> <%= val -%> <% end -%><% end -%> + |