Merge pull request #11 from jamesp9/plugins
Enable host specific plugins
This commit is contained in:
commit
cc20e70200
@ -13,6 +13,20 @@ include:
|
|||||||
- mode: 755
|
- mode: 755
|
||||||
{% endfor %}
|
{% 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 }}:
|
{{ munin_node.service }}:
|
||||||
service.running:
|
service.running:
|
||||||
- watch:
|
- watch:
|
||||||
|
@ -8,7 +8,7 @@ munin_master:
|
|||||||
hosts:
|
hosts:
|
||||||
"localhost.localdomain":
|
"localhost.localdomain":
|
||||||
address: "127.0.0.1"
|
address: "127.0.0.1"
|
||||||
use_node_name: "yes"
|
use_node_name: "no"
|
||||||
|
|
||||||
munin_node:
|
munin_node:
|
||||||
log_level: 4
|
log_level: 4
|
||||||
@ -26,6 +26,7 @@ munin_node:
|
|||||||
- "\\.dpkg-(tmp|new|old|dist)$"
|
- "\\.dpkg-(tmp|new|old|dist)$"
|
||||||
- "\\.rpm(save|new)$"
|
- "\\.rpm(save|new)$"
|
||||||
- "\\.pod$"
|
- "\\.pod$"
|
||||||
|
host_name: {{ grains['host'] }}
|
||||||
allow:
|
allow:
|
||||||
- "^127\\.0\\.0\\.1$"
|
- "^127\\.0\\.0\\.1$"
|
||||||
- "^::1$"
|
- "^::1$"
|
||||||
@ -54,3 +55,9 @@ munin_node_common_plugins:
|
|||||||
users: users
|
users: users
|
||||||
load: load
|
load: load
|
||||||
if_eth0: if_
|
if_eth0: if_
|
||||||
|
|
||||||
|
munin_node_specific_plugins:
|
||||||
|
example_server_01:
|
||||||
|
cpuspeed: cpuspeed
|
||||||
|
example_server_02:
|
||||||
|
irqstats: irqstats
|
||||||
|
Loading…
Reference in New Issue
Block a user