dd
This commit is contained in:
parent
dfc02ee4b0
commit
da1b36de16
5 changed files with 8 additions and 35 deletions
|
@ -21,6 +21,7 @@ services:
|
||||||
/root@pbs.localdomain/ pbs@mgrote.net
|
/root@pbs.localdomain/ pbs@mgrote.net
|
||||||
/root@pve5.localdomain/ pve5@mgrote.net
|
/root@pve5.localdomain/ pve5@mgrote.net
|
||||||
/no-reply@ubnt.com/ ubiquity@mgrote.net
|
/no-reply@ubnt.com/ ubiquity@mgrote.net
|
||||||
|
/mg@munin.localdomain/ munin@mgrote.net
|
||||||
# rewrite FROM "nobody@lldap" to "lldap@mgrote.net"
|
# rewrite FROM "nobody@lldap" to "lldap@mgrote.net"
|
||||||
# /.*/ würde alle absender adressen ersetzen
|
# /.*/ würde alle absender adressen ersetzen
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -42,6 +42,8 @@ munin_node_bind_port: "4949"
|
||||||
munin_node_allowed_cidrs: [127.0.0.1]
|
munin_node_allowed_cidrs: [127.0.0.1]
|
||||||
|
|
||||||
### mgrote_munin_master
|
### mgrote_munin_master
|
||||||
|
munin_enable_alerts: true
|
||||||
|
munin_alerts_to: info@mgrote.net
|
||||||
munin_hosts:
|
munin_hosts:
|
||||||
- name: "{{ ansible_fqdn }}.mgrote.net"
|
- name: "{{ ansible_fqdn }}.mgrote.net"
|
||||||
address: "127.0.0.1"
|
address: "127.0.0.1"
|
||||||
|
|
|
@ -25,6 +25,8 @@ munin_server_plugins:
|
||||||
- munin_update
|
- munin_update
|
||||||
munin_cron_job: present
|
munin_cron_job: present
|
||||||
munin_dbdir: "/var/lib/munin"
|
munin_dbdir: "/var/lib/munin"
|
||||||
|
munin_enable_alerts: true
|
||||||
|
munin_alerts_to: nobody@nowhere.com
|
||||||
munin_hosts:
|
munin_hosts:
|
||||||
- name: "{{ ansible_fqdn }}"
|
- name: "{{ ansible_fqdn }}"
|
||||||
address: "127.0.0.1"
|
address: "127.0.0.1"
|
||||||
|
|
|
@ -59,40 +59,6 @@
|
||||||
create: true
|
create: true
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
# TODO mail config? wie senden?
|
|
||||||
# COPY munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf
|
|
||||||
|
|
||||||
|
|
||||||
# # configure mail notification
|
|
||||||
# if [[ -n "$MAILCONTACT" && -n "$MAILSERVER" && -n "$MAILPORT" && -n "$MAILUSER" && -n "$MAILPASSWORD" && -n "$MAILDOMAIN" ]] ; then
|
|
||||||
# MAILCONTACT=${MAILCONTACT:="contact@domain.test"}
|
|
||||||
# sed -i "s/mailcontact/$MAILCONTACT/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# sed -i "s/mailcontact/$MAILCONTACT/g" /etc/munin/munin-conf.d/munin_mail.conf
|
|
||||||
# MAILSERVER=${MAILSERVER:="mail.domain.test"}
|
|
||||||
# sed -i "s/mailserver/$MAILSERVER/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# sed -i "s/mailserver/$MAILSERVER/g" /etc/ssmtp/revaliases
|
|
||||||
# MAILPORT=${MAILPORT:="25"}
|
|
||||||
# sed -i "s/mailport/$MAILPORT/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# sed -i "s/mailport/$MAILPORT/g" /etc/ssmtp/revaliases
|
|
||||||
# MAILUSER=${MAILUSER:="alert@domain.test"}
|
|
||||||
# sed -i "s/mailuser/$MAILUSER/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# MAILFROM=${MAILFROM:="munin@domain.test"}
|
|
||||||
# sed -i "s/mailfrom/$MAILFROM/g" /etc/ssmtp/revaliases
|
|
||||||
# MAILPASSWORD=${MAILPASSWORD:="XXXXXXXXX"}
|
|
||||||
# sed -i "s/mailpassword/$MAILPASSWORD/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# MAILDOMAIN=${MAILDOMAIN:="domain.test"}
|
|
||||||
# sed -i "s/maildomain/$MAILDOMAIN/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# sed -i "s/mailhost/$MAILDOMAIN/g" /etc/ssmtp/ssmtp.conf
|
|
||||||
# MAILNAME=${MAILNAME:="Munin"}
|
|
||||||
# sed -i "s/munin application user/$MAILNAME/g" /etc/passwd
|
|
||||||
# else
|
|
||||||
# rm /etc/munin/munin-conf.d/munin_mail.conf /etc/ssmtp/ssmtp.conf
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# cronjoib? timer? TODO
|
|
||||||
|
|
||||||
# sed -i "s/\*\/5/\*\/5/g" /etc/cron.d/munin kommt imho aus paket
|
|
||||||
|
|
||||||
- name: check if munin has been run
|
- name: check if munin has been run
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: /var/cache/munin/www/index.html
|
path: /var/cache/munin/www/index.html
|
||||||
|
|
|
@ -89,7 +89,9 @@ includedir /etc/munin/munin-conf.d
|
||||||
|
|
||||||
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
|
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
|
||||||
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
|
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
|
||||||
#contact.someuser.command mail -s "Munin ${var:worst}: ${var:group}::${var:host}::${var:plugin}" somejuser@fnord.comm
|
{% if munin_enable_alerts is sameas true %}
|
||||||
|
#contact.someuser.command mail -s "Munin ${var:worst}: ${var:group}::${var:host}::${var:plugin}" {{ munin_alerts_to }}
|
||||||
|
{% endif %}
|
||||||
#contact.anotheruser.command mail -s "Munin ${var:worst}: ${var:group}::${var:host}::${var:plugin}" anotheruser@blibb.comm
|
#contact.anotheruser.command mail -s "Munin ${var:worst}: ${var:group}::${var:host}::${var:plugin}" anotheruser@blibb.comm
|
||||||
#
|
#
|
||||||
# For those with Nagios, the following might come in handy. In addition,
|
# For those with Nagios, the following might come in handy. In addition,
|
||||||
|
|
Loading…
Reference in a new issue