Merge pull request #6 from jamesp9/plugins
enable common plugins on a node
This commit is contained in:
commit
6612930c6a
@ -39,6 +39,13 @@ Includes ``munin.node``.
|
|||||||
|
|
||||||
Generates a config file for the munin node based on pillar data.
|
Generates a config file for the munin node based on pillar data.
|
||||||
|
|
||||||
|
``munin.node.plugins``
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Includes ``munin.node``.
|
||||||
|
|
||||||
|
Symlinks the desired plugins on the munin node based on pillar data.
|
||||||
|
|
||||||
``munin.tls``
|
``munin.tls``
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -22,18 +22,21 @@
|
|||||||
'service': 'munin-node',
|
'service': 'munin-node',
|
||||||
'config': '/etc/munin/munin-node.conf',
|
'config': '/etc/munin/munin-node.conf',
|
||||||
'config_src': 'salt://munin/files/munin-node.conf',
|
'config_src': 'salt://munin/files/munin-node.conf',
|
||||||
|
'plugin_dir': '/usr/share/munin/plugins',
|
||||||
},
|
},
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
'package': 'munin-node',
|
'package': 'munin-node',
|
||||||
'service': 'munin-node',
|
'service': 'munin-node',
|
||||||
'config': '/etc/munin/munin-node.conf',
|
'config': '/etc/munin/munin-node.conf',
|
||||||
'config_src': 'salt://munin/files/munin-node.conf',
|
'config_src': 'salt://munin/files/munin-node.conf',
|
||||||
|
'plugin_dir': '/usr/share/munin/plugins',
|
||||||
},
|
},
|
||||||
'Arch': {
|
'Arch': {
|
||||||
'package': 'munin-node',
|
'package': 'munin-node',
|
||||||
'service': 'munin-node',
|
'service': 'munin-node',
|
||||||
'config': '/etc/munin/munin-node.conf',
|
'config': '/etc/munin/munin-node.conf',
|
||||||
'config_src': 'salt://munin/files/munin-node.conf',
|
'config_src': 'salt://munin/files/munin-node.conf',
|
||||||
|
'plugin_dir': '/usr/lib/munin/plugins',
|
||||||
},
|
},
|
||||||
}, merge=salt['pillar.get']('munin_node:lookup')) %}
|
}, merge=salt['pillar.get']('munin_node:lookup')) %}
|
||||||
|
|
||||||
|
19
munin/node/plugins.sls
Normal file
19
munin/node/plugins.sls
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{% from "munin/map.jinja" import munin_node with context %}
|
||||||
|
|
||||||
|
include:
|
||||||
|
- munin.node
|
||||||
|
|
||||||
|
# Enable common plugins
|
||||||
|
{% for plugin, linked_file in pillar.get('munin_node_common_plugins', {}).items() %}
|
||||||
|
/etc/munin/plugins/{{ plugin }}:
|
||||||
|
file.symlink:
|
||||||
|
- target: {{ munin_node.plugin_dir}}/{{ linked_file }}
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 755
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{{ munin_node.service }}:
|
||||||
|
service.running:
|
||||||
|
- watch:
|
||||||
|
- file: /etc/munin/plugins/*
|
@ -45,3 +45,12 @@ munin_tls:
|
|||||||
-----BEGIN CERTIFICATE-----
|
-----BEGIN CERTIFICATE-----
|
||||||
Inline CA certificate key
|
Inline CA certificate key
|
||||||
-----END CERTIFICATE-----
|
-----END CERTIFICATE-----
|
||||||
|
|
||||||
|
munin_node_common_plugins:
|
||||||
|
cpu: cpu
|
||||||
|
df: df
|
||||||
|
memory: memory
|
||||||
|
uptime: uptime
|
||||||
|
users: users
|
||||||
|
load: load
|
||||||
|
if_eth0: if_
|
||||||
|
Loading…
Reference in New Issue
Block a user