From 975e04af3fbc06f1c70c4a70a68c42809fe119ad Mon Sep 17 00:00:00 2001 From: Julian Date: Fri, 11 Dec 2015 00:18:07 +0100 Subject: [PATCH 1/2] Allows you to specify additional servers (which arent managed by chef) by setting the munin.nodes variable. This is an array of objects, which take the same fqdn and ipaddress keys as the node search returns by default. Also this enables to reach servers hidden behind a firewall through munin native ssh. --- recipes/server.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/server.rb b/recipes/server.rb index 57feaf0..aa9111c 100644 --- a/recipes/server.rb +++ b/recipes/server.rb @@ -76,6 +76,10 @@ end end +if node['munin']['nodes'].is_a?(Array) + munin_servers += node['munin']['nodes'] +end + if munin_servers.empty? Chef::Log.info 'No nodes returned from search, using this node so munin configuration has data' munin_servers = [node] From bf81de87e5b1a864bbbdc071e0023827c5721cf3 Mon Sep 17 00:00:00 2001 From: Julian Date: Fri, 11 Dec 2015 00:22:38 +0100 Subject: [PATCH 2/2] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e911719..4a7ff4b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Attributes - `node['munin']['max_processes']` - Maximum number of simultaneous Munin-update processes. When not set, munin will use as many as necessary. Default is to use as many as necessary. - `node['munin']['max_graph_jobs']` - Maximum number of parallel processes used by munin-graph when calling rrdgraph, default is "6" - `node['munin']['max_cgi_graph_jobs']` - Maximum number of parallel munin-cgi-graph or munin-fastcgi-graph jobs, default is "6" - +- `node['munin']['nodes']` - An array of additional nodes. Each array element is an object with `fqdn` and `ipaddress` as required keys. Recipes -------