Charmed Blackbox Exporter

  • By Canonical Observability
Channel Revision Published Runs on
latest/stable 15 04 Jun 2024
Ubuntu 22.04 Ubuntu 20.04
latest/stable 1 16 Jan 2024
Ubuntu 22.04 Ubuntu 20.04
latest/candidate 15 04 Jun 2024
Ubuntu 22.04 Ubuntu 20.04
latest/candidate 1 12 Dec 2023
Ubuntu 22.04 Ubuntu 20.04
latest/beta 15 22 May 2024
Ubuntu 22.04 Ubuntu 20.04
latest/beta 1 22 Nov 2023
Ubuntu 22.04 Ubuntu 20.04
latest/edge 16 17 Jul 2024
Ubuntu 22.04 Ubuntu 20.04
latest/edge 1 08 Jun 2021
Ubuntu 22.04 Ubuntu 20.04
juju deploy blackbox-exporter-k8s --channel edge
Show information


Key Value
Summary Using the Blackbox Exporter charm
Categories how-to
Difficulty 2
Author Luca Bello


The Blackbox Exporter is a tool that allows for blackbox probing of endpoints over a multitude of protocols, including HTTP, HTTPS, DNS, TCP, ICMP, and gRPC.

This document will focus on how to use the charm and how to leverage the integrations with other charms from the COS Lite bundle. If in doubt, please reference the Blackbox Exporter repository.

How to use the charm

The Blackbox Exporter charm is stand-alone; however, to run probes programmatically, you’ll need to integrate it with the prometheus-k8s charm.


Deploying the charm works just like any other:

juju deploy blackbox-exporter-k8s blackbox
# To run probes programmatically, you need Prometheus
juju deploy prometheus-k8s prometheus
juju relate blackbox prometheus


There’s two configurations you can provide through juju config options:

  • the Blackbox exporter configuration file (optional): this is where you specify and customize which modules are available for the exporter to use;
  • the probes configuration: this is the Prometheus scrape jobs configuration, which you should write following the official docs.

Please note that, for the probes configuration, the relabel_configs section will be overridden by the charm with the correct relabeling and with the appropriate Blackbox Exporter url.

After writing those files, simply pass them to the charm through juju config:

# Blackbox Exporter configuration
juju config blackbox config_file='@/path/to/config.yml'
# Probes configuration
juju config blackbox probes_file='@/path/to/probes.yml'


The Blackbox Exporter charm provides a monitoring dashboard for all of your probes; you can use it by relating the charm to grafana-k8s.

Logs can be forwarded to Loki by relating to loki-k8s.

The charm also has catalogue-k8s integration; relating the two will show Blackbox Exporter on the Catalogue home page.

Help improve this document in the forum (guidelines). Last updated 10 months ago.