{"id":17396,"date":"2026-02-27T17:54:17","date_gmt":"2026-02-27T12:24:17","guid":{"rendered":"https:\/\/www.skynats.com\/blog\/?p=17396"},"modified":"2026-02-27T17:54:20","modified_gmt":"2026-02-27T12:24:20","slug":"how-to-install-and-configure-blackbox-for-prometheus-on-ubuntu-24","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/how-to-install-and-configure-blackbox-for-prometheus-on-ubuntu-24\/","title":{"rendered":"How to Install and Configure Blackbox for Prometheus on Ubuntu 24"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>Modern infrastructure requires continuous availability monitoring.<\/li>\n\n\n\n<li>Traditional monitoring checks internal metrics, but does not verify real user accessibility.<\/li>\n\n\n\n<li>Prometheus is a powerful open-source monitoring and alerting system.<\/li>\n\n\n\n<li>Blackbox Exporter extends Prometheus by enabling external probing of services.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-install-and-configure-blackbox-for-prometheus-on-ubuntu-24\"><strong>Install and Configure Blackbox for Prometheus on Ubuntu 24<\/strong><\/h2>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-create-a-system-user\"><strong>Create a system user<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-extract-and-install\"><strong>Extract and install<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -xvf blackbox_exporter-*.linux-amd64.tar.gz\ncd blackbox_exporter-*\nsudo mv blackbox_exporter \/usr\/local\/bin\/\nsudo chown blackbox:blackbox \/usr\/local\/bin\/blackbox_exporter<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-configure-blackbox\"><strong>Configure Blackbox<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\" id=\"h-create-configuration-directory\"><strong>Create configuration directory:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir \/etc\/blackbox_exporter\nsudo nano \/etc\/blackbox_exporter\/blackbox.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">configuration:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http_2xx:\n    prober: http\n    timeout: 5s\n    http:\n      method: GET\n      valid_status_codes: &#91;]\n      preferred_ip_protocol: \"ip4\"\n\n  icmp:\n    prober: icmp\n    timeout: 5s\n\n  tcp_connect:\n    prober: tcp\n    timeout: 5s<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-create-systemd-service\"><strong>Create Systemd Service<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/systemd\/system\/blackbox_exporter.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=Blackbox Exporter\nAfter=network.target\n\n&#91;Service]\nUser=blackbox\nGroup=blackbox\nType=simple\nExecStart=\/usr\/local\/bin\/blackbox_exporter \\\n  --config.file=\/etc\/blackbox_exporter\/blackbox.yml\n\n&#91;Install]\nWantedBy=multi-user.target\nReload and start service\nsudo systemctl daemon-reload\nsudo systemctl enable blackbox_exporter\nsudo systemctl start blackbox_exporter<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status blackbox_exporter<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify Blackbox Exporter<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">http:\/\/SERVER-IP:9115<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-configure-prometheus\"><strong>Configure Prometheus<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edit Prometheus config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/prometheus\/prometheus.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scrape_configs:\n - job_name: 'blackbox-http'\n   metrics_path: \/probe\n   params:\n     module: &#91;http_2xx]\n   static_configs:\n     - targets:\n       - https:\/\/google.com\n       - https:\/\/yourdomain.com\n   relabel_configs:\n     - source_labels: &#91;__address__]\n       target_label: __param_target\n     - source_labels: &#91;__param_target]\n       target_label: instance\n     - target_label: __address__\n       replacement: localhost:9115<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Prometheus:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart prometheus<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-view-in-prometheus\"><strong>View in Prometheus<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Access with:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">http:\/\/SERVER-IP:9090<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need expert assistance with Blackbox for Prometheus on <a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\">Ubuntu<\/mark><\/a> 24, the team at Skynats is here to help. Our certified engineers specialize in <a href=\"https:\/\/www.skynats.com\/devops-support\">DevOps<\/a> &amp; Infrastructure solutions, including monitoring setup, performance optimization, alert configuration, and production-grade observability architecture. Whether you&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install and Configure Blackbox for Prometheus on Ubuntu 24 Create a system user Extract and install Configure Blackbox Create configuration directory: configuration: modules: Create Systemd Service Add: Check status: Verify Blackbox Exporter Open: http:\/\/SERVER-IP:9115 Configure Prometheus Edit Prometheus config: Add: Restart Prometheus: View in Prometheus Access with: http:\/\/SERVER-IP:9090 Blackbox Exporter enhances monitoring by testing services [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1064],"class_list":["post-17396","post","type-post","status-publish","format-standard","hentry","category-blog","tag-devops-support-services"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=17396"}],"version-history":[{"count":2,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17396\/revisions"}],"predecessor-version":[{"id":17413,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/17396\/revisions\/17413"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=17396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=17396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=17396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}