Skip to content
Snippets Groups Projects
Verified Commit 4b707005 authored by ynerant's avatar ynerant
Browse files

[mtail] More configuration to select what should be monitored


Signed-off-by: ynerant's avatarYohann D'ANELLO <ynerant@crans.org>
parent 0f590044
No related branches found
No related tags found
1 merge request!254Cachan
---
glob_mtail:
config:
- dhcpd.mtail
- radiusd.mtail
remove: []
......@@ -56,3 +56,9 @@ loc_rsyslog_server:
vars:
- name: InputRELPServerRun
value: 20514
loc_mtail:
config:
- dhcpd.mtail
remove:
- radiusd.mtail
......@@ -105,6 +105,10 @@ linx.adm.crans.org
[mailman]
mailman.adm.crans.org
[mtail]
gulp.cachan-adm.crans.org
tealc.adm.crans.org
[prometheus]
monitoring.adm.crans.org
fyre.cachan-adm.crans.org
......
......@@ -44,9 +44,10 @@
# roles: ["prometheus-node-exporter-postfix"]
# Monitor logs with mtail
- hosts: tealc.adm.crans.org,gulp.cachan-adm.crans.org
- hosts: mtail
vars:
mirror: '{{ glob_mirror | default({}) | combine(loc_mirror | default({})) }}'
mtail: '{{ glob_mtail | default({}) | combine(loc_mtail | default({})) }}'
roles:
- mtail
......
......@@ -30,9 +30,14 @@
src: "mtail/{{ item }}.j2"
dest: "/etc/mtail/{{ item }}"
mode: 0644
loop:
- dhcpd.mtail
- radiusd.mtail
loop: "{{ mtail.config }}"
notify: Restart mtail
- name: Drop unusued configuration
file:
path: "/etc/mtail/{{ item }}"
state: absent
loop: "{{ mtail.remove }}"
notify: Restart mtail
- name: Indicate role in motd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment