pass params as a struct to ProbeFn#1273
Closed
LaurenceChau wants to merge 1 commit into
Closed
Conversation
e3e274d to
edba31a
Compare
Signed-off-by: laurence.chau <laurence.chau@pulsar.com>
SuperQ
requested changes
Aug 1, 2024
Member
SuperQ
left a comment
There was a problem hiding this comment.
For the same reasons as previous requests to add more query parameters to the exporter we can not accept this.
Author
|
Since the source IP is allowed to be configured in the config file, it is reasonable that the value should also be able to be configured through remote parameters. |
Member
|
For the same reasons as #1098, we do not want a proliferation of module configurations as query params. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have a use case which is to send icmp ping and tcp ping via different network interfaces in a machine with multiple network cards. Although the source ip can be configured through blackbox.yaml, I think it would be more fixable if we can control the source ip of the probeFn through remote parameters of Prometheus request.
To do so, I suggest we create a probeOpts struct. Instead of passing the target to probeFn, we can pass the struct with target value inside to probeFn. This change also allow different ProbeFn to have different parameters in the future.