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.servicewith its REST status API bound to127.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.servicefor 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
0600file. 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.
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.
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 StandardConnect via SSH
ssh azureuser@<vm-ip>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/healthYou 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.
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.
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.
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 bgpalerterThe -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.
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 bgpalerterEnable 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.comAfter 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
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 at build) as the official self-contained binary, refreshed to the latest release on first boot
bgpalerter.servicewith its REST status API bound to127.0.0.1:8011- An nginx reverse proxy on port 80: public
/health, password-protected/status - Secure by design, 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.servicefor the first-boot password, binary refresh and info note. This oneshot generates a unique password on each instance'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-instance status API password generated on first boot, in a root-only
0600file. No two instances 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, fully patched, with unattended security upgrades enabled
- 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.
Connecting to your instance
Connect over SSH as the default user for the operating system variant you launched. BGPalerter is a headless daemon, so all interaction is over SSH and the status API.
For Ubuntu 24.04 LTS, the SSH login user is ubuntu. For example: ssh ubuntu@<instance-public-ip>
Prerequisites
You need an active AWS account, an EC2 key pair, and a VPC with a subnet.
BGPalerter is lightweight and CPU-friendly. The recommended instance type is m5.large, which is comfortable for most networks. Monitoring a very large number of prefixes benefits from more memory.
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 instance. It needs no inbound port to monitor, because it makes an outbound connection to the BGP data stream.
Subscribe and launch from AWS Marketplace
Find BGPalerter on AWS Marketplace, subscribe, and launch an instance from the Ubuntu 24.04 delivery option. Choose your instance type and attach a security group that allows TCP 22 (SSH) from your management network and TCP 80 (the status API) from the networks that need to query it.
Front port 80 with TLS in production (see the HTTPS step below).
Launch from the AWS CLI
AMI_ID="<the-marketplace-ami-id>"
# from your Marketplace subscription KEY_NAME="my-keypair" SG_ID="sg-xxxxxxxx"
# allows 22 from your mgmt CIDR and 80 as needed SUBNET_ID="subnet-xxxxxxxx" aws ec2 run-instances \
--image-id "$AMI_ID" --instance-type m5.large \
--key-name "$KEY_NAME" --security-group-ids "$SG_ID" --subnet-id "$SUBNET_ID" \
--metadata-options 'HttpTokens=required' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=bgpalerter-01}]'Connect via SSH
ssh ubuntu@<public-ip>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 is-active bgpalerter nginx ss -tln | grep -E ':80 |127.0.0.1:8011' curl -s http://127.0.0.1/healthYou 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.
Read your per-instance status API password
The instance 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 and that the info note and htpasswd are readable by root only.
sudo cat /root/bgpalerter-info.txt echo "unauthenticated /status -> HTTP $(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/status)" ls -l /root/bgpalerter-info.txt /etc/nginx/.bgpalerter_htpasswdThe 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. The public /health endpoint stays 200 for load balancer probes.
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 with connected: true for the RIS connector. This confirms that it is attached to the live BGP stream and processing updates.
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.
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 bgpalerterThe -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.
See detections and configure alerting
BGPalerter has a built-in self-test that injects fake BGP updates, so you can confirm the full monitor and report pipeline before you rely on it. By default, alerts are written to a rotating log file under /var/lib/bgpalerter/logs/. Watch the file to see detections 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)"Each detection names the affected prefix, the peers that saw it and the AS path. A more-specific announcement of one of your prefixes from an unexpected origin AS stands out immediately.
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.
sudo systemctl restart bgpalerterEnable HTTPS
nginx fronts the status API on port 80 and is ready for TLS. Point a DNS record at the instance. 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.comAfter issuance, restrict the security group 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 an instance launched from this image is ready immediately.
The first-boot service generates the per-instance status API password and refreshes the BGPalerter binary to the latest release. It then disables itself, so subsequent reboots are unaffected. The OS ships fully patched 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 distributed under the BSD 3-Clause license. SecureAnyCloud is not affiliated with or endorsed by NTT or the BGPalerter project. 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 AWS
Launch BGPalerter with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com