diff --git a/munin/files/munin-node.conf b/munin/files/munin-node.conf new file mode 100644 index 0000000..06e8274 --- /dev/null +++ b/munin/files/munin-node.conf @@ -0,0 +1,14 @@ +{% set config = pillar.get('munin_node', {}) -%} +# +# This config file is managed by salt. +# + +{%- for name, value in config.iteritems() %} + {%- if value is string or value is number%} +{{ name }} {{ value }} + {%- else %} + {%- for item in value %} +{{ name }} {{ item }} + {%- endfor %} + {%- endif %} +{%- endfor %} diff --git a/munin/files/munin.conf b/munin/files/munin.conf new file mode 100644 index 0000000..e69de29 diff --git a/munin/node/config.sls b/munin/node/config.sls index e69de29..4b9d7fd 100644 --- a/munin/node/config.sls +++ b/munin/node/config.sls @@ -0,0 +1,12 @@ +{% from "munin/map.jinja" import munin_node with context %} + +include: + - munin.node + +munin_node_config: + file.managed: + - name: {{ munin_node.config }} + - source: {{ munin_node.config_src }} + - template: jinja + - watch_in: + - service: munin_node diff --git a/pillar.example b/pillar.example index e69de29..925cf8b 100644 --- a/pillar.example +++ b/pillar.example @@ -0,0 +1,32 @@ +munin_master: + dbdir: "/var/lib/munin" + htmldir: "/var/cache/munin/www" + logdir: "/var/log/munin" + rundir: "/var/run/munin" + includerdir: "/etc/munin/munin-conf.d" + hosts: + - "localhost.localdomain": + - address: "127.0.0.1" + - use_node_name: yes + +munin_node: + log_level: 4 + log_file: "/var/log/munin/munin-node.log" + pid_file: "/var/run/munin/munin-node.pid" + background: 1 + setsid: 1 + user: root + group: root + ignore_file: + - "[\\#~]$" + - "DEADJOE$" + - "\\.bak$" + - "%$" + - "\\.dpkg-(tmp|new|old|dist)$" + - "\\.rpm(save|new)$" + - "\\.pod$" + allow: + - "^127\\.0\\.0\\.1$" + - "^::1$" + host: "*" + port: 4949