Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Install and Configure Blackbox for Prometheus on Ubuntu 24

Table of Contents

  • Modern infrastructure requires continuous availability monitoring.
  • Traditional monitoring checks internal metrics, but does not verify real user accessibility.
  • Prometheus is a powerful open-source monitoring and alerting system.
  • Blackbox Exporter extends Prometheus by enabling external probing of services.

Install and Configure Blackbox for Prometheus on Ubuntu 24

Create a system user

Extract and install

tar -xvf blackbox_exporter-*.linux-amd64.tar.gz
cd blackbox_exporter-*
sudo mv blackbox_exporter /usr/local/bin/
sudo chown blackbox:blackbox /usr/local/bin/blackbox_exporter

Configure Blackbox

Create configuration directory:

sudo mkdir /etc/blackbox_exporter
sudo nano /etc/blackbox_exporter/blackbox.yml

configuration:

modules:

http_2xx:
    prober: http
    timeout: 5s
    http:
      method: GET
      valid_status_codes: []
      preferred_ip_protocol: "ip4"

  icmp:
    prober: icmp
    timeout: 5s

  tcp_connect:
    prober: tcp
    timeout: 5s

Create Systemd Service

sudo nano /etc/systemd/system/blackbox_exporter.service

Add:

[Unit]
Description=Blackbox Exporter
After=network.target

[Service]
User=blackbox
Group=blackbox
Type=simple
ExecStart=/usr/local/bin/blackbox_exporter \
  --config.file=/etc/blackbox_exporter/blackbox.yml

[Install]
WantedBy=multi-user.target
Reload and start service
sudo systemctl daemon-reload
sudo systemctl enable blackbox_exporter
sudo systemctl start blackbox_exporter

Check status:

sudo systemctl status blackbox_exporter

Verify Blackbox Exporter

Open:

http://SERVER-IP:9115

Configure Prometheus

Edit Prometheus config:

sudo nano /etc/prometheus/prometheus.yml

Add:

scrape_configs:
 - job_name: 'blackbox-http'
   metrics_path: /probe
   params:
     module: [http_2xx]
   static_configs:
     - targets:
       - https://google.com
       - https://yourdomain.com
   relabel_configs:
     - source_labels: [__address__]
       target_label: __param_target
     - source_labels: [__param_target]
       target_label: instance
     - target_label: __address__
       replacement: localhost:9115

Restart Prometheus:

sudo systemctl restart prometheus

View in Prometheus

Access with:

http://SERVER-IP:9090

Blackbox Exporter enhances monitoring by testing services from an external perspective rather than relying only on internal metrics. When integrated with Prometheus, it provides powerful and flexible probing capabilities for HTTP, HTTPS, TCP, ICMP, and DNS. It helps quickly detect website downtime, SSL certificate issues, network failures, and port connectivity problems.

If you need expert assistance with Blackbox for Prometheus on Ubuntu 24, the team at Skynats is here to help. Our certified engineers specialize in DevOps & Infrastructure solutions, including monitoring setup, performance optimization, alert configuration, and production-grade observability architecture. Whether you’re deploying Blackbox exporter for uptime monitoring, integrating it with existing Prometheus environments, or scaling your infrastructure for high availability, we ensure a secure and reliable implementation tailored to your business needs.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Subscribe and get your first issue fixed for Free!

Looking for server support and 24x7 monitoring?

Have doubts? Connect with us now.