Skip to content

bgp watchdog

Thomas Mangin edited this page Apr 11, 2026 · 2 revisions

Pre-Alpha. This page describes behavior that may change.

Deferred route announcement controlled by named watchdog groups. Pairs with the healthcheck plugin to drive announce and withdraw based on external service state.

Category

Resilience.

Configuration

Static routes attach to a watchdog group. The group is either announced (when UP) or withdrawn (when DOWN).

bgp {
    peer upstream {
        update {
            attribute { origin igp; next-hop self; }
            nlri      { ipv4/unicast add 10.0.0.1/32; }
            watchdog  { name hc-dns; withdraw true; }
        }
    }
}

When withdraw true, the route is announced on UP and withdrawn on DOWN. When withdraw false, the route is re-announced with a different MED instead of withdrawn.

Behaviour

The plugin tracks a set of named watchdog groups. Each route attached to a group is held in a deferred state until the group becomes active. When the group flips to UP, the plugin dispatches the announce. When it flips to DOWN, the plugin dispatches the withdraw (or re-announce, depending on withdraw).

Multiple routes can share the same watchdog group. The group flips once, and every attached route updates together.

Metrics

Registered via ConfigureMetrics on the plugin registration. All are on the main Prometheus endpoint.

Metric Type Meaning
ze_watchdog_peers_up gauge Watchdog peers with established sessions.
ze_watchdog_route_announcements_total counter Watchdog routes announced to peers.
ze_watchdog_route_withdrawals_total counter Watchdog routes withdrawn from peers.

See plugin metrics for the registration pattern.

Interactions

  • bgp-healthcheck drives watchdog groups from shell-command probes.
  • Plugins can dispatch group state changes programmatically through the SDK.

Source

main/internal/component/bgp/plugins/watchdog/

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally