Healthcheck script for use with ExaBGP
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead of sysadminblog:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


ExaBGP healthcheck is a simple Perl script for use with ExaBGP which can control the announcing of routes based on the status of health checks. The health checks can be anything you like - the script only cares about the exit code (0 is success, anything else is a failure).


  • IPv4 and IPv6 support
  • Configuration file changes are applied automatically, no need to reload/restart services. The configuration file is verified before applying changes, if there are errors the changes will not be applied.
  • Health checks can call your own scripts, normal CLI utilities etc.
  • Multiple services can be defined with different IP addresses
  • Easy monitoring of service status - plain text files contain the current status of services, the image name for the process also has the current status
  • Command line options to view the current status, validate config etc.
  • Logging (with debug options)

As an example of what this can be used for, see my blog post.

All documentation for this project is available in the Wiki, I recommend having a quick read through.

System Requirements

An installation of Perl is required with the following modules:


For more information, see the System Requirements wiki page.


Copy to the ExaBGP directory, usually /etc/exabgp. Create a configuration file for the health check script in /etc/exabgp/healthcheck.conf.

Configure ExaBGP as normal and add the appropriate process for the Neighbor, eg.:

      process myservice {
        run /etc/exabgp/ -c announce -n myservice;

For complete instructions, see the Installation wiki page.

Configuration File

A sample configuration file is included for both ExaBGP and

For complete configuration options, see the Configuration File wiki page.

I have included the configuration and check command I use for my anycasted webservice and recursive DNS in healthcheck.conf.sample

Command Line Usage

For a list of available options, call the script with the '-help' switch:

/etc/exabgp/ -help

For full instuctions, see the CLI Usage wiki page.