Deployment guide

BGPalerter

Overview

BGPalerter is a self-hosted, open-source BGP and RPKI monitoring and alerting daemon from NTT. It connects to the real-time BGP stream and continuously watches your prefixes and autonomous systems for visibility loss, prefix hijacks, unexpected more-specific announcements, RPKI-invalid routes and ROA misconfiguration. You learn about a routing incident affecting your network in minutes rather than hours.

BGPalerter delivers alerts through simple reports to a rotating log file, email, Slack, syslog, HTTP webhooks, Kafka and more, all driven by plain YAML configuration.

This SecureAnyCloud image installs the official BGPalerter binary at /usr/local/bin/bgpalerter. It runs as the bgpalerter service, with its built-in REST status API bound to loopback 127.0.0.1:8011, behind nginx on port 80. nginx is ready for your TLS certificate.

What you get:

  • BGPalerter (verified at 2.0.1) as the official self-contained binary
  • bgpalerter.service with its REST status API bound to 127.0.0.1:8011
  • An nginx reverse proxy on port 80: public /health, password-protected /status
  • Secure by default, no default login. BGPalerter's status API ships with no authentication of its own, so this image never exposes it unauthenticated. The daemon binds the API to loopback only, and nginx serves it. GET /health is an unauthenticated liveness endpoint for load balancer probes, while /status and every other path require HTTP Basic Auth (username SecureAnyCloud).
  • bgpalerter-firstboot.service for the first-boot password, binary refresh and info note. This oneshot generates a unique password on each VM's first boot, writes it to a root-only file and to an nginx htpasswd, resolves the instance URL and writes a root-only info note, then disables itself.
  • A unique per-VM status API password generated on first boot, in a root-only 0600 file. No two VMs share a password, and none is baked into the image.
  • Always current. On first boot, the appliance downloads the newest BGPalerter release binary, falling back to the baked version if the network is unavailable. Every launch runs current software rather than the version frozen at build time.
  • Ubuntu 24.04 LTS base, patched at build time
  • 24/7 SecureAnyCloud support, 24h response SLA

Note on the interface: BGPalerter is a headless daemon with no web UI. You drive it through its REST status API and its YAML configuration files (config.yml and prefixes.yml), and it emits alerts through the reports you enable. This guide uses curl against the status API and edits the YAML files directly.

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet.

BGPalerter is lightweight and CPU-friendly. The recommended VM size is Standard_B2s (2 vCPU, 4 GB RAM), which is sufficient for most networks. Use a larger size only if you monitor a very large number of prefixes.

BGPalerter needs outbound access to the RIPE RIS live stream (wss://ris-live.ripe.net) to receive BGP data, so allow outbound HTTPS/WSS from the VM.

1

Deploy from the Azure Portal

Search the Marketplace for BGPalerter on Ubuntu 24.04 and choose your VM size. Attach an NSG that allows TCP 22 (SSH) from your management network and TCP 80 / 443 (the status API) from the networks that need to query it.

Front port 80 with TLS in production (see the HTTPS step below). BGPalerter needs no inbound port to monitor, because it makes an outbound connection to the BGP data stream.

2

Deploy from the Azure CLI

RG="bgpalerter-prod"; LOCATION="eastus"; VM_NAME="bgpalerter-01" IMAGE_URN="sac1647283583153:bgpalerter-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION" az network vnet create -g "$RG" --name bgp-vnet --address-prefix 10.90.0.0/16 --subnet-name bgp-subnet --subnet-prefix 10.90.1.0/24 az network nsg create -g "$RG" --name bgp-nsg az network nsg rule create -g "$RG" --nsg-name bgp-nsg --name allow-ssh --priority 100 \
  --source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 22 --access Allow --protocol Tcp az network nsg rule create -g "$RG" --nsg-name bgp-nsg --name allow-web --priority 110 \
  --source-address-prefixes "<your-mgmt-cidr>" --destination-port-ranges 80 443 --access Allow --protocol Tcp
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:bgpalerter-ubuntu-24-04:default:latest
az vm create -g "$RG" --name "$VM_NAME" --image "$IMAGE_URN" \
  --size Standard_B2s --storage-sku StandardSSD_LRS \
  --admin-username azureuser --ssh-key-values "$SSH_KEY" \
  --vnet-name bgp-vnet --subnet bgp-subnet --nsg bgp-nsg --public-ip-sku Standard
3

Connect via SSH

ssh azureuser@<vm-ip>
4

Verify the services are running

BGPalerter's status API listens on loopback 127.0.0.1:8011 and nginx fronts it on port 80. The health endpoint is public, and the status API requires your password.

sudo systemctl start bgpalerter nginx 2>/dev/null || true
sudo systemctl is-active bgpalerter nginx ss -tln | grep -E ':80 |127.0.0.1:8011' curl -s http://127.0.0.1/health

You should see both services active, the two listening sockets (the status API bound to loopback, nginx on port 80), and ok from the public health endpoint.

5

Read your per-VM status API password

The VM generated this password on first boot and stored it in a root-only file. Read it and keep it secret, because it authenticates every status API request. Then confirm that unauthenticated requests are rejected.

sudo cat /root/bgpalerter-info.txt echo "unauthenticated /status -> HTTP $(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/status)"

The info note holds STATUS_API_PASSWORD and the instance URLs. It is owned by root:root with mode 0600. An unauthenticated call to /status returns 401 because nginx enforces authentication.

6

Query the status API

Load the password into a shell variable, then query the status API through nginx with HTTP Basic Auth. BGPalerter returns a JSON document describing the health of its components, the RIS connectors and the RPKI data. A healthy daemon returns HTTP 200.

export
BGP_PW=$(sudo grep '^STATUS_API_PASSWORD=' /root/bgpalerter-info.txt | cut -d= -f2-)
echo "authenticated /status -> HTTP $(curl -s -o /dev/null -w '%{http_code}' -u sac:$BGP_PW http://127.0.0.1/status)" curl -s -u sac:$BGP_PW http://127.0.0.1/status | jq .

The authenticated call returns 200 and a JSON object reporting each connector and the RPKI status. Point an external monitor or dashboard at this endpoint, over HTTPS and with the password.

7

Monitor your own network

Out of the box, the appliance ships a starter prefixes.yml that monitors a documented example autonomous system, so the daemon runs immediately. Replace it with your own prefixes and ASNs.

BGPalerter can generate the watch list for you from an ASN. It discovers the prefixes that the AS originates and writes them into prefixes.yml.

cd /var/lib/bgpalerter
sudo systemctl stop bgpalerter
sudo -u bgpalerter /usr/local/bin/bgpalerter generate -a <YOUR_ASN> -o prefixes.yml -i -m sudo systemctl start bgpalerter

The -i flag includes RPKI/ROA monitoring for the generated prefixes and -m includes monitoring the ASN itself. Review the generated prefixes.yml, then restart the service.

You can also edit prefixes.yml by hand to add or remove prefixes. Each entry has a description, an asn and monitoring options.

8

Configure alerting

By default, BGPalerter writes alerts to a rotating log file under /var/lib/bgpalerter/logs/. Watch the file to see alerts as they are raised.

ls -1 /var/lib/bgpalerter/logs/
sudo tail -n 20 /var/lib/bgpalerter/logs/reports-$(date -u +%Y-%m-%d).log 2>/dev/null || echo "no alerts logged yet (this is normal on a quiet network)"

To deliver alerts to email, Slack, syslog, an HTTP webhook, Kafka and more, edit the reports: section of /var/lib/bgpalerter/config.yml and restart the service. Each report type has a template in the file.

For example, to add email alerts, uncomment and complete the reportEmail block with your SMTP server and recipients, then restart:

sudo systemctl restart bgpalerter
9

Enable HTTPS

nginx fronts the status API on port 80 and is ready for TLS. Point a DNS record at the VM. Then obtain a certificate with certbot and let it configure nginx for port 443.

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.example.com

After issuance, restrict the NSG so only 443 (and 22 from your management network) is reachable. Then query the status API over https://your-domain.example.com/status with the password.

Persistence, first boot and updates

The configuration (config.yml, prefixes.yml) and the alert logs live on the OS disk under /var/lib/bgpalerter/ and are captured into the image, so a VM launched from this image is ready immediately.

The first-boot service generates the per-VM status API password and refreshes the BGPalerter binary to the latest release. It then disables itself, so subsequent reboots are unaffected. The OS is patched at build time and ships with unattended security upgrades enabled.

Support

Every SecureAnyCloud deployment includes 24/7 support with a 24-hour response SLA. Contact sales@secureanycloud.com for help with deployment, configuration or scaling.

This is a repackaged open-source software product, with additional charges for SecureAnyCloud support services. BGPalerter is a trademark of its respective owner. All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Deploy on Azure

Launch BGPalerter on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure