Skip to content

pass params as a struct to ProbeFn#1273

Closed
LaurenceChau wants to merge 1 commit into
prometheus:masterfrom
LaurenceChau:probeOpts
Closed

pass params as a struct to ProbeFn#1273
LaurenceChau wants to merge 1 commit into
prometheus:masterfrom
LaurenceChau:probeOpts

Conversation

@LaurenceChau
Copy link
Copy Markdown

@LaurenceChau LaurenceChau commented Aug 1, 2024

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.

@LaurenceChau LaurenceChau force-pushed the probeOpts branch 3 times, most recently from e3e274d to edba31a Compare August 1, 2024 09:56
Signed-off-by: laurence.chau <laurence.chau@pulsar.com>
Copy link
Copy Markdown
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the same reasons as previous requests to add more query parameters to the exporter we can not accept this.

@LaurenceChau
Copy link
Copy Markdown
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.

@SuperQ
Copy link
Copy Markdown
Member

SuperQ commented Aug 1, 2024

For the same reasons as #1098, we do not want a proliferation of module configurations as query params.

@SuperQ SuperQ closed this Aug 1, 2024
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