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 ------- 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]