From 77c919f2860682efb2ac1e5c686c58daa939c806 Mon Sep 17 00:00:00 2001 From: jamesp9 Date: Sat, 14 Nov 2015 12:11:19 +1100 Subject: [PATCH 1/2] plugins: host specific --- munin/node/plugins.sls | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/munin/node/plugins.sls b/munin/node/plugins.sls index b41638f..4167ade 100644 --- a/munin/node/plugins.sls +++ b/munin/node/plugins.sls @@ -13,6 +13,20 @@ include: - mode: 755 {% endfor %} +# Node specific plugins +{% for hostname, plugin in salt['pillar.get']('munin_node_specific_plugins').items() %} +{% if salt['pillar.get']('munin_node:host_name') == hostname %} +{% for plugin_name, linked_file in plugin.items() %} +/etc/munin/plugins/{{ plugin_name }}: + file.symlink: + - target: {{ munin_node.plugin_dir}}/{{ linked_file }} + - user: root + - group: root + - mode: 755 +{% endfor %} +{% endif %} +{% endfor %} + {{ munin_node.service }}: service.running: - watch: From a3085eb69ec118f4822267d69264e740e0606ebd Mon Sep 17 00:00:00 2001 From: jamesp9 Date: Fri, 20 Nov 2015 22:38:49 +1100 Subject: [PATCH 2/2] update pillar example --- pillar.example | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 743a052..8ac9aad 100644 --- a/pillar.example +++ b/pillar.example @@ -8,7 +8,7 @@ munin_master: hosts: "localhost.localdomain": address: "127.0.0.1" - use_node_name: "yes" + use_node_name: "no" munin_node: log_level: 4 @@ -26,6 +26,7 @@ munin_node: - "\\.dpkg-(tmp|new|old|dist)$" - "\\.rpm(save|new)$" - "\\.pod$" + host_name: {{ grains['host'] }} allow: - "^127\\.0\\.0\\.1$" - "^::1$" @@ -54,3 +55,9 @@ munin_node_common_plugins: users: users load: load if_eth0: if_ + +munin_node_specific_plugins: + example_server_01: + cpuspeed: cpuspeed + example_server_02: + irqstats: irqstats