successful munin-node.conf rendered from pillar data, based on default

config
This commit is contained in:
Kenny Do 2014-01-04 23:49:40 -08:00
parent f0d97575e1
commit 7293f8bb12
4 changed files with 58 additions and 0 deletions

View File

@ -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 %}

0
munin/files/munin.conf Normal file
View File

View File

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

View File

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