All scripts
fault
Expert
2–8 min
BGP Fault Finder
Deep BGP diagnostic: neighbor state analysis, flap detection, prefix count anomalies, route reflector topology verification, AS-path policy violations, and MED/LOCAL_PREF inconsistencies.
Cisco IOS/XE/XR
Juniper
Arista
You're viewing a preview
The full script, parameters, and execution console are available with a free account.
Already have access? Sign in →
Capabilities
- BGP neighbor state matrix
- Flap history & MTBF calc
- Prefix count drift detection
- Route reflector client mapping
- AS-path regex violation scan
- MED/LP policy audit
- NEXT_HOP reachability check
Required inputs
Parameters the script accepts. Defaults shown; some are vendor- or context-gated.
| Parameter | Type | Default | Notes |
|---|---|---|---|
Flap threshold (mins) flap_threshold_mins | number | 60 | — |
Prefix drift alert (%) prefix_drift_pct | number | 10 | — |
Verify RR topology check_rr | bool | true | Route-reflector topology probes require Cisco IOS/XR — auto-disabled for the selected vendor mix. |
AS-path policy regex as_path_regex | string | ^65[0-9]{3}$ | AS-path policy audit only runs when RR topology verification is on. |
Alert webhook URL alert_webhook | string | — | — |
Sample inventory schema
Authoritative shape of the device/policy data this script consumes.
devices.csv
csv
16 routers across LON1/FRA1/NYC1/SIN1 — multi-vendor with RR rolesterminal
hostname,mgmt_ip,site,role,vendor,os,asn,bgp_router_id,loopback,rr_role,maintenance,ssh_port core-rtr-01,10.10.0.11,LON1,core,cisco,iosxr-7.9.2,65000,10.255.0.11,10.255.0.11/32,server,false,22 core-rtr-02,10.10.0.12,LON1,core,cisco,iosxr-7.9.2,65000,10.255.0.12,10.255.0.12/32,server,false,22 core-rtr-03,10.10.0.13,FRA1,core,cisco,iosxr-7.9.2,65000,10.255.0.13,10.255.0.13/32,server,false,22
bgp_peers.yaml
yaml
eBGP transit + IXP/PNI peerings with MD5 vault refs and max-prefixyaml
# eBGP transit + IXP peerings (operator-owned ASN 65000)
peers:
- device: edge-rtr-01
neighbor: 192.0.2.1Expected output
Reference terminal output the script should produce — used as a stylistic and structural target.
terminal
[2025-05-13 14:22:01] INFO Starting BGP fault analysis across 47 devices... ╔══════════════════════════════════════════════════════════╗ ║ BGP NEIGHBOR STATE MATRIX ║ ╠══════════════╦════════════╦═══════════╦════════════╦════╣ ║ Device ║ Neighbor ║ State ║ Uptime ║ #PFX║ ╠══════════════╬════════════╬═══════════╬════════════╬════╣ ║ core-rtr-01 ║ 10.0.0.2 ║ Established║ 14d 06h ║ 847 ║ ║ core-rtr-01 ║ 10.0.0.6 ║ IDLE ║ 00:03:14 ║ 0 ║ ← CRITICAL ║ core-rtr-02 ║ 10.0.0.1 ║ Established║ 14d 06h ║ 847 ║