-
Notifications
You must be signed in to change notification settings - Fork 3
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
giusebar
wants to merge
19
commits into
canonical:main
Choose a base branch
from
ubuntu-robotics:feat/add-blackbox-probes-library
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7f0fddb
wip - add library and use it in blackbox
giusebar 976981b
pass full configuration in the relation
giusebar f6dcd4e
add library documentation, add monitor targets_changed in the charm
giusebar 786db08
add provider and consumer tests
giusebar 5519d53
update config file with relation modules correctly
giusebar c267fcc
add pydantic validation for probes and modules
giusebar b08a263
add pydantic check on the requirer side, small fixes
giusebar ce8e4df
update README
giusebar eff4d9a
remove unnecessary patch network get
giusebar ae10472
address comments
giusebar c2c11d3
Merge branch 'main' into feat/add-blackbox-probes-library
giusebar e6b28c7
fix docstring and lint
giusebar 001fc6a
add lib unique id
giusebar bdfdd8d
Merge branch 'main' into feat/add-blackbox-probes-library
giusebar 9bcc2a9
extract blackbox probes configuration build from charm code into a se…
giusebar 6601b60
fix lint
giusebar 3fbdb94
remove invalid_probe custom event and use stored state for modules as…
giusebar be3701e
add hash for ensure probes uniqueness, add test
giusebar 693ce7d
remove outdated comment
giusebar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
|
||||||
```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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## OCI Images | ||||||
This charm is published on Charmhub with blackbox exporter images from | ||||||
the official [quay.io/prometheus/blackbox-exporter]. | ||||||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.