Skip to content

This charmed operator automates the operational procedures of running Blackbox Exporter, a Prometheus exporter running blackbox probes over a multitude of protocols.

License

Notifications You must be signed in to change notification settings

ubuntu-robotics/blackbox-exporter-k8s-operator

 
 

Repository files navigation

Blackbox Exporter Operator (k8s)

Charmhub Badge Release Discourse Status

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.

Getting started

Basic deployment

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

Configuration

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.

OCI Images

This charm is published on Charmhub with blackbox exporter images from the official quay.io/prometheus/blackbox-exporter.

Additional Information

About

This charmed operator automates the operational procedures of running Blackbox Exporter, a Prometheus exporter running blackbox probes over a multitude of protocols.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%