Working alertmanager source. Starting playbook to clean logfiles
This commit is contained in:
@@ -10,15 +10,21 @@
|
||||
- name: Run Template
|
||||
condition:
|
||||
all:
|
||||
- event.alert.labels.org == "OYS"
|
||||
- event.alert.labels.alertname == "root filesystem over 80% full"
|
||||
- event.alert.labels.mountpoint == '/'
|
||||
action:
|
||||
run_job_template:
|
||||
name: Demo - Clean Log Directory
|
||||
organization: OYS
|
||||
job_args:
|
||||
extra_vars:
|
||||
alertmanager_annotations: "{{ event.annotations }}"
|
||||
alertmanager_generator_url: "{{ event.generatorURL }}"
|
||||
event_mountpoint: "{{ event.mountpoint }}"
|
||||
- event.alert.labels.org == "OYS" and event.alert.status == "firing" and event.alert.labels.alertname == "root filesystem over 80% full"
|
||||
actions:
|
||||
- print_event:
|
||||
pretty: true
|
||||
- run_job_template:
|
||||
name: Demo - Clean Log Directory
|
||||
organization: OYS
|
||||
job_args:
|
||||
extra_vars:
|
||||
alertmanager_annotations: "{{ event.alert.annotations }}"
|
||||
alertmanager_generator_url: "{{ event.alert.generatorURL }}"
|
||||
event_mountpoint: "{{ event.alert.labels.mountpoint }}"
|
||||
alertmanager_instance: "{{ event.alert.labels.instance }}"
|
||||
- name: Test Contact Point
|
||||
condition: event.alert.labels.alertname == "TestAlert" or event.alert.labels.org == "OYS"
|
||||
actions:
|
||||
- print_event:
|
||||
pretty: true
|
||||
|
||||
Reference in New Issue
Block a user