-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature request: Custom endpoint IP for http checks #543
Comments
You can already override the host header, and running the blackbox exporter behind the NAT would also make things simpler.
Automation is your friend. |
We have around 5 LoadBalancer and several hundreds of host which we want to check. Sure this is possible but it's not really elegant just to throw configuration against the system :) When we can override the host header why not override the endpoint ip address? :) |
That's what the target URL parameter is. |
Ah sure but we also need for each host one scape configuration as we also have to specify the module every time. Also Prometheus supports service discovery (eg. In a cloud environment where the hosts are constantly changing this doesn't feel right to regenerate the configuration every time the cloud changes. It would be nice to override the endpoint IP like we can override the headers instead of generating the configuration and reloading the blackbox exporter. Debugging in prometheus is much easier then in blackbox exporter. |
Would also sponsor a beer or two 😊 |
Yes, that's Prometheus's responsibility. This sounds like something that you can do with relabelling on the Prometheus end. |
It's possible to set the We just want to avoid a huge generated configuration if there is a possibility to override the endpoint. |
It's not. |
But then it needs for every host an own configuration. That's exactly our problem and we cannot just use Prometheus's SD. That's why I created this feature request :) |
If you've that complex a setup, then you'll have to handle it via your configuration management system. You might also want to consider running the blackbox exporter behind the NAT. |
We have also the same problem with some PaaS services in the cloud (eg. Azure) where you cannot put the blackbox exporter in between because it's not possible. Also putting the exporter behind the NAT is just not possible for several internal reasons (big company stuff and a lots of security issues). We wanted to avoid throwing hundreds of configuration lines against the problem and wanted to solve this with a simple feature which can be used with Prometheus service discovery. We want to avoid a fork and also think, that maybe other people could also have this issue. |
No matter what changes are made here, I believe you'd need to have lots of automated config generation. |
I don't understand your point. If we can override the endpoint IP we can use Prometheus SD and the checks are fully automated with a single configuration line and one module in blackbox exporter. Or we have to create one scraping config for prometheus AND one module config for blackbox exporter every time a new hosts is added. So the second "solution" is better then using Prometheus SD? 🤔 |
You need a target again per Host line though, so it's not that simple. |
We already have a working solution for a lot of these checks using Prometheus SD, but not for "not directly reachable hosts" or "we want to just monitor the k8s ingress without PaaS service in front to check if the PaaS service is down again" using Prometheus service discovery. We just search for a solution to have a bunch of different blackbox exporter modules with different endpoints so we don't have to configure these targets without SD. |
I'm not seeing how you need this feature then, those use cases are fine without it. |
Example: To check if What we want: Sure it's possible to override the endpoint using iptables or a dns masq but it's PITA in Kubernetes for just a bunch of Pods (blackbox exporter). For exactly that usecase we want to override the endpoint. It's exactly the same usecase like the host header override but just the other way around. |
It would also be fine to use the header override if it is settable via http params to make it possible to set this value using eg. annotations from the service discovery. |
Pass in the IP in the HTTP param, and override Host to www.foobar.example in the module configuration. |
And that's exactly what we don't want as this makes Prometheus service discovery impossible to use because we need a different module configuration for every host in the system and blackbox exporter doesn't have any kind of service discovery. It's very easy to achieve this feature with a possibilty to inject this configuration with a url parameter but it makes this very diffucult and very hard to debug if the configuration has generated every time the cloud is changing and keep that in sync with the service discovery in Prometheus. I don't understand why this feature request is discussed in that way even if there are already three thumbs up 😞 |
Yes, you need a module for every test you wish to perform. Having otherwise would be unsustainable, and would turn this exporter into an open proxy. |
That's why i asked for an endpoint configuration in the first place. |
The blackbox exporter is designed with the idea that you're preforming the same check against many many targets, not many many checks against one target. |
And that's exactly what we want to avoid --> running the same check with only one target (and have for each target one unique module configuration). |
That's not in line with how exporters are designed I'm afraid. Target discovery is the responsibility of Prometheus, not an exporter. You'd end up having to generate the blackbox config with your proposal too, as you'd need a module per target. |
I've implemented an example in PR #545 |
As indicated on the PR, this doesn't make sense in terms of the overall design of this exporter. |
Hi, we would require this feature as well. I followed the entire discussion, and we are facing the exact same issues as the reporter of the issue. Could you reconsider adding this feature? |
I think #795 would achieve that. |
Allow custom endpoint IP addresses for HTTP checks.
Sometimes services are exposed behind a NAT or not reachable via the published DNS address so it would be nice to specify a custom IP address for overriding the DNS request.
possible example:
The current solution (creating a module for each check) is too much work and creates a huge configuration :(
The text was updated successfully, but these errors were encountered: