Charmed Blackbox Exporter (blackbox-exporter-k8s) is a charm for Blackbox Exporter.
The charm imposes configurable resource limits on the workload, can be readily integrated with prometheus, grafana and loki, and it comes with built-in alert rules and dashboards for self-monitoring.
Once you have a controller and model ready, you can deploy the blackbox exporter using the Juju CLI:
juju deploy --channel=beta blackbox-exporter-k8s
The available channels are listed at the top of the page and can also be retrieved with Charmcraft CLI:
$ charmcraft status blackbox-exporter-k8s
Track Base Channel Version Revision Resources
latest ubuntu 22.04 (amd64) stable - - -
candidate - - -
beta 1 1 blackbox-exporter-image (r1)
edge 1 1 blackbox-exporter-image (r1)
Once the Charmed Operator is deployed, the status can be checked by running:
juju status --relations --storage --color
In order to configure the Blackbox Exporter, a configuration file
should be provided using the
config_file
option:
juju config blackbox-exporter-k8s \
config_file='@path/to/blackbox.yml'
To verify Blackbox Exporter is using the expected configuration you can use the
show-config
action:
juju run-action blackbox-exporter-k8s/0 show-config --wait
To configure the actual probes, there first needs to be a Prometheus relation:
juju relate blackbox-exporter-k8s prometheus
Then, the probes configuration should be written to a file (following the
Blackbox Exporter docs
) and passed via juju config
:
juju config blackbox-exporter-k8s \
probes_file='@path/to/probes.yml'
Note that the relabel_configs
of each scrape job doesn't need to be specified, and will be
overridden by the charm with the needed labels and the correct Blackbox Exporter url.
This charm is published on Charmhub with blackbox exporter images from the official quay.io/prometheus/blackbox-exporter.