Skip to content

Conversation

@raboof
Copy link

@raboof raboof commented Nov 28, 2025

What this PR does / Which issue(s) does the PR fix:

Add a 'source_interface' parameter to the 'http' probe

Does this PR introduce a user-facing change?

[FEATURE] allow restricting the HTTP probe to a given network interface

Sadly I didn't see a clear way to meaningfully test this feature.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG added in release-notes section of PR Desc.

@raboof raboof force-pushed the http-source-interface branch 4 times, most recently from 109cab9 to 6d281cb Compare November 29, 2025 11:08
Somewhat based on prometheus#1152

Signed-off-by: Arnout Engelen <[email protected]>
@raboof raboof force-pushed the http-source-interface branch from 6d281cb to 599e22b Compare December 16, 2025 22:14
@electron0zero
Copy link
Member

I did some digging into the topic and I think that this is not something that should be supported by blackbox exporter, because it falls outside the core responsibility of the blackbox exporter.

You can use network namespaces to bind your process to a network namespace that's attached to your interface, if that doesn't work for you, checkout few examples in here and here

@raboof
Copy link
Author

raboof commented Jan 2, 2026

I did some digging into the topic

Thank you!

I think that this is not something that should be supported by blackbox exporter, because it falls outside the core responsibility of the blackbox exporter.

You can use network namespaces to bind your process to a network namespace that's attached to your interface

if that doesn't work for you, checkout few examples in here and here

I see I did not do a good job explaining what the use case for the feature in this PR is: I have a node that has both a wired ethernet connection and a wifi card. I want to run the blackbox exporter on this node to monitor the connectivity of a target host both via ethernet and via wifi. Perhaps that was clear to you but I wanted to make sure to describe it in the PR now :)

It looks like your suggestion is to wrap blackbox-exporter using the techniques you link, to 'convince' it to bind to the 'right' interface, right? tbh that looks quite a bit more complex than adding the feature to blackbox-exporter :) . Of course if you decide it's out-of-scope for blackbox-exporter we can close this PR, but I'll likely just keep using this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants