diff --git a/README.md b/README.md index 3ed7501..c384985 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,29 @@ 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 +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. +#### Dynamic Configuration + +The list of probes and the list of modules for probing can also be changed dinamically from other charms. +The charm offers a relation to allow charms to dinamically export endpoints to be probed via Blackbox and custom modules for probing. Those are exported over the blackbox-targets relation using the blackbox_probes interface: + +```shell +requires: + blackbox-probes: + interface: blackbox_probes +``` + +The probes provided dynamically by a charm are merged with the probes defined in a configuration file, same with the modules which are integrated in the blackbox-config file. +In order for the charm defined probes to be probed via this charm all that is required is to relate the two charms with: + +```shell +juju relate blackbox +``` + +Charms that seek to provide probes for Blackbox, must do so using the provided blackbox_probes charm library. This library ensures that probes and modules defined by a charm are forwared correctly to Prometheus, and the metrics displayed in the associated Grafana Dashboard. + ## OCI Images This charm is published on Charmhub with blackbox exporter images from the official [quay.io/prometheus/blackbox-exporter].