Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add blackbox probes library #43

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 dynamically from other charms.
The charm offers a relation to allow charms to dynamically export endpoints to be probed via Blackbox Exporter and custom modules for probing. Those are exported over the probes relation using the blackbox_exporter_probes interface:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The charm offers a relation to allow charms to dynamically export endpoints to be probed via Blackbox Exporter and custom modules for probing. Those are exported over the probes relation using the blackbox_exporter_probes interface:
The charm offers a relation to allow charms to forward custom probe spec to Blackbox Exporter. Those are exported over the probes relation using the blackbox_exporter_probes interface:


```shell
requires:
probes:
interface: blackbox_exporter_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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
The cusrom probes provided via relation data 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 <charm> blackbox:probes
```

Charms that seek to provide probes for Blackbox Exporter, must do so using the provided blackbox_exporter_probes charm library. This library ensures that probes and modules defined by a charm are forwarded correctly to Prometheus, and the metrics displayed in the associated Grafana Dashboard.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Charms that seek to provide probes for Blackbox Exporter, must do so using the provided blackbox_exporter_probes charm library. This library ensures that probes and modules defined by a charm are forwarded correctly to Prometheus, and the metrics displayed in the associated Grafana Dashboard.
Charms that seek to provide probes for Blackbox Exporter, can do so using the provided blackbox_exporter_probes charm library. This library ensures that probes and modules defined by a charm are forwarded 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].
Expand Down
Loading
Loading