Skip to content

bgp healthcheck

Thomas Mangin edited this page Jul 26, 2026 · 2 revisions

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

Service healthcheck plugin with watchdog route control. Monitors service availability by running shell commands on a timer and drives BGP route announcement or withdrawal through watchdog groups.

Category

Core.

Configuration

Auto-loaded when a bgp block containing a healthcheck section is present. The config root is bgp.

bgp {
    healthcheck {
        probe dns-check {
            command        "/usr/local/bin/check-dns.sh";
            interval       5;
            timeout        3;
            rise           3;
            fall           2;
            group          hc-dns;
            withdraw true;
        }
    }
}

See the Healthcheck operator guide for the full configuration reference, FSM details, hook execution, IP management, and worked examples.

Behaviour

Each configured probe runs a shell command at a fixed interval. After a configurable number of consecutive successes (rise), the probe transitions to UP. After consecutive failures (fall), it transitions to DOWN. The probe state drives the named watchdog group: UP announces the attached routes, DOWN withdraws them (or adjusts their MED when withdraw is false).

Probes start once startup is complete, not when the plugin is configured. A probe dispatches watchdog commands at the engine, and a dispatch frame written during the configure stage lands in the stream where the engine expects the stage-5 ready message, which kills the plugin for the rest of the process lifetime. This is the general rule for any plugin that dispatches at startup: do it from the all-plugins-ready callback, once the registries are frozen. See Go plugins.

Interactions

  • Depends on bgp and bgp-watchdog. The engine starts both before this plugin.
  • Drives watchdog groups that bgp-watchdog manages. Each probe maps to a named group.
  • Supports hooks (on-up, on-down, on-change, on-disabled) for external side-effects.

Source

main/internal/component/bgp/plugins/healthcheck/

See also

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally