Skip to content

Instantly share code, notes, and snippets.

@nmartins0611
Created August 22, 2023 09:28
Show Gist options
  • Save nmartins0611/3bae5c44a77eb7d1b850c1bd8d0d80c7 to your computer and use it in GitHub Desktop.
Save nmartins0611/3bae5c44a77eb7d1b850c1bd8d0d80c7 to your computer and use it in GitHub Desktop.
Rulebook listening for BGP Errors
##example
---
- name: Port State Event from switches
hosts: all
sources:
- ansible.eda.kafka:
host: broker
port: 9092
topic: network
rules:
- name: BGP change detected
condition: event.fields.session_state == "IDLE"
action:
run_playbook:
name: bgp_troubleshooting.yml
post_events: true
- name: Notify Chat
condition: event.status is defined
action:
run_playbook:
name: notify_chat.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment