detect OOM
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Gregory Colpart 2022-04-11 16:34:39 +02:00
parent 84178d6b24
commit e3a75b9584
2 changed files with 22 additions and 0 deletions

View File

@ -72,3 +72,8 @@
name: postfix
state: reloaded
- name: restart log2mail
service:
name: log2mail
state: restarted

View File

@ -16,3 +16,20 @@
daemon-reload: yes
state: started
enabled: yes
- name: log2mail config is present
blockinfile:
dest: /etc/log2mail/config/default
owner: log2mail
group: adm
mode: "0640"
marker: "# {mark} ANSIBLE MANAGED RULES FOR DEFAULT INSTANCE"
block: |
file = /var/log/syslog
pattern = "Out of memory: Kill"
mailto = {{ log2mail_alert_email or general_alert_email | mandatory }}
template = /etc/log2mail/mail
notify: restart log2mail
tags:
- log2mail