-
Notifications
You must be signed in to change notification settings - Fork 16.8k
[stable/prometheus-blackbox-exporter] Fix blackbox target's metrics labels #22546
Conversation
Hi @mcanevet. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
Sorry, I didn't have time to investigate but this looks interesting, I'll try to find time to review/test. |
Okay, I've read a bit more about that and you seem to be right, however doing so would remove the "human readable name" that was set to the |
@desaintmartin I updated my PR to keep the |
Thanks! One last thing, could you fill the "how to upgrade" paragraph for the 5.0.0? |
@desaintmartin done! |
The metrics labels currently generated does not match what is generated by the setup described here: https://prometheus.io/docs/guides/multi-target-exporter/#querying-multi-target-exporters-with-prometheus and https://github.com/prometheus/blackbox_exporter#prometheus-configuration The previous metricsRelabeling is only valid if the target contains the URLs to check. What we need in the end is: - `__address__` set to the blackbox exporter, and it it already the case as the `selector` matches the blackbox exporter, - `__param_target` set to the target to check, and it is already ensure without relabeling, - `instance` set to the target to check. This patches ensures that the metrics has this labels: ``` probe_success{endpoint="http",instance="http://prometheus.io",job="blackbox-exporter-prometheus-blackbox-exporter",namespace="monitoring",pod="blackbox-exporter-prometheus-blackbox-exporter-84d9b64646-vgqcc",service="blackbox-exporter-prometheus-blackbox-exporter"} 1 ``` Without this patch, we have this (note that we lost the `instance` label): ``` probe_success{endpoint="http",job="blackbox-exporter-prometheus-blackbox-exporter",namespace="monitoring",pod="blackbox-exporter-prometheus-blackbox-exporter-84d9b64646-vgqcc",service="blackbox-exporter-prometheus-blackbox-exporter",target="prometheus-io"} 1 ``` Signed-off-by: Mickaël Canévet <mickael.canevet@gmail.com>
Thanks a lot! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: desaintmartin, mcanevet The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The metrics labels currently generated does not match what is generated by the setup described here: https://prometheus.io/docs/guides/multi-target-exporter/#querying-multi-target-exporters-with-prometheus and https://github.com/prometheus/blackbox_exporter#prometheus-configuration The previous metricsRelabeling is only valid if the target contains the URLs to check. What we need in the end is: - `__address__` set to the blackbox exporter, and it it already the case as the `selector` matches the blackbox exporter, - `__param_target` set to the target to check, and it is already ensure without relabeling, - `instance` set to the target to check. This patches ensures that the metrics has this labels: ``` probe_success{endpoint="http",instance="http://prometheus.io",job="blackbox-exporter-prometheus-blackbox-exporter",namespace="monitoring",pod="blackbox-exporter-prometheus-blackbox-exporter-84d9b64646-vgqcc",service="blackbox-exporter-prometheus-blackbox-exporter"} 1 ``` Without this patch, we have this (note that we lost the `instance` label): ``` probe_success{endpoint="http",job="blackbox-exporter-prometheus-blackbox-exporter",namespace="monitoring",pod="blackbox-exporter-prometheus-blackbox-exporter-84d9b64646-vgqcc",service="blackbox-exporter-prometheus-blackbox-exporter",target="prometheus-io"} 1 ``` Signed-off-by: Mickaël Canévet <mickael.canevet@gmail.com> Signed-off-by: Adrien Loiseau <adrien.loiseau@logic-immo.com>
The metrics labels currently generated does not match what is generated by the setup described here: https://prometheus.io/docs/guides/multi-target-exporter/#querying-multi-target-exporters-with-prometheus and https://github.com/prometheus/blackbox_exporter#prometheus-configuration The previous metricsRelabeling is only valid if the target contains the URLs to check. What we need in the end is: - `__address__` set to the blackbox exporter, and it it already the case as the `selector` matches the blackbox exporter, - `__param_target` set to the target to check, and it is already ensure without relabeling, - `instance` set to the target to check. This patches ensures that the metrics has this labels: ``` probe_success{endpoint="http",instance="http://prometheus.io",job="blackbox-exporter-prometheus-blackbox-exporter",namespace="monitoring",pod="blackbox-exporter-prometheus-blackbox-exporter-84d9b64646-vgqcc",service="blackbox-exporter-prometheus-blackbox-exporter"} 1 ``` Without this patch, we have this (note that we lost the `instance` label): ``` probe_success{endpoint="http",job="blackbox-exporter-prometheus-blackbox-exporter",namespace="monitoring",pod="blackbox-exporter-prometheus-blackbox-exporter-84d9b64646-vgqcc",service="blackbox-exporter-prometheus-blackbox-exporter",target="prometheus-io"} 1 ``` Signed-off-by: Mickaël Canévet <mickael.canevet@gmail.com> Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
The metrics labels currently generated does not match what is generated
by the setup described here: https://prometheus.io/docs/guides/multi-target-exporter/#querying-multi-target-exporters-with-prometheus
and https://github.com/prometheus/blackbox_exporter#prometheus-configuration
The previous metricsRelabeling is only valid if the target contains the URLs to
check.
What we need in the end is:
__address__
set to the blackbox exporter, and it it already the caseas the
selector
matches the blackbox exporter,__param_target
set to the target to check, and it is already ensurewithout relabeling,
instance
set to the target to check.This patches ensures that the metrics has this labels:
Without this patch, we have this (note that we lost the
instance
label):Signed-off-by: Mickaël Canévet mickael.canevet@gmail.com
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[stable/mychartname]
)