Use Blackbox Exporter for HTTP Status Checks using Prometheus and Grafana

AWS | Azure | Endpoint Check | Kubernetes

βš— Kevin Summersill πŸ”‹
4 min readDec 11, 2020

In this article, we will be utilizing the Blackbox Exporter within Prometheus to obtain HTTP status updates of endpoints. This article does assume that you have an installed version of Prometheus, a Kubernetes (K8s) cluster, as well as Grafana already instead.

What is Blackbox Exporter?

The Blackbox Exporter is a tool that we can utilize to probe (aka test) the status of endpoints. The probe can analyze the endpoints over HTTP, HTTPS, DNS, TCP, and ICMP. In this article, we will be utilizing the HTTP (aka http_2xx) module to test for 200 status checks.

Creating the Blackbox Exporter

Namespace Creation

  1. We first need to create the namespace that we will add to the Blackbox Exporter. Please note, Prometheus is installed in the β€œmonitoring” namespace. If you have Prometheus installed in a different namespace, then you can move forward to the next step.

Run the following to create a namespace called monitoring:

kubectl create ns monitoring

2. Creating the Config Map used by Blackbox. Run the following Yaml file:

--

--

βš— Kevin Summersill πŸ”‹

Enterprise Solution Architect | Certified K8s Administrator/Developer βš“ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer πŸ”₯