Skip to content

Instantly share code, notes, and snippets.

@tommeramber
Last active June 11, 2025 07:51
Show Gist options
  • Save tommeramber/c3ec81f1731fad891af3c7317e49fc35 to your computer and use it in GitHub Desktop.
Save tommeramber/c3ec81f1731fad891af3c7317e49fc35 to your computer and use it in GitHub Desktop.
- name: alertmanager events listener
hosts: all
sources:
- name: eda alertmanager webhook
ansible.eda.alertmanager:
host: 0.0.0.0
port: 9091
rules:
- name: pvc-over-used
condition: event.alert.status == "firing" and event.alert.labels.alertname == "PVC-OVER-USED"
actions:
- run_job_template:
name: fix-pvc-over-used
organization: "Default"
job_args:
extra_vars:
payload: "{{ event.alert }}"
- name: nfs-stale-or-node-health-check
# condition: event.alert.status == "firing" and (event.alert.labels.alertname == "NFSDetectJobFailed" or event.alert.labels.alertname == "NodeHealthJobCompletion")
condition: event.alert.status == "firing" and (event.alert.labels.alertname == "NodeTestProblem" or event.alert.labels.alertname == "TestNodeProblem")
actions:
- run_job_template:
name: reboot-problematic-node
organization: "Default"
job_args:
extra_vars:
payload: "{{ event.alert }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment