-
Notifications
You must be signed in to change notification settings - Fork 802
Add multi-target support #1063
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
base: master
Are you sure you want to change the base?
Add multi-target support #1063
Conversation
0f39926
to
94732c6
Compare
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
…'s empty and if so, don't parse it Signed-off-by: pincher95 <yuri.tsuprun@logz.io> Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
b3486c1
to
8bafbac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to spend more time with the code to provide all of my feedback, but want to provide what I have ready while I gave it the first pass.
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the guts of this are really solid. It did take me some time to give a proper review so once the changes are pushed up, I will need to allocate some time to re-review. Thanks for submitting this, I think it will be a good improvement.
Update examples/auth_modules.yml Fix main.go to apply userpass credentials only if the module type is explicitly set to userpass. Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Keep light-weight validation for the probe params during runtime Add AWS SigV4 authentication module support Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
Add TLS config validation Update config test to include TLS config Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
…when no clusterinfo retriever is attached, avoiding the previous "unknown_cluster" label. Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
…sts to /probe. Updated auth_modules.yml to include AWS SigV4 signing and mTLS support. Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
PR: Add multi-target
/probe
endpoint + auth-modules (fixes #1062)This PR implements the feature described in issue #1062 (“multi-target scraping”).
───────────────────────────────
What’s new
───────────────────────────────
/probe
endpointAccepts
?target=
and (optionally)auth_module=
.For each request the exporter spins up a throw-away Prometheus registry, registers the usual collectors with the supplied ES URL, gathers, and streams metrics.
Auth-module support (
--config.file=
)Simple YAML schema modelled after
postgres_exporter
&mysqld_exporter
.Alias on
/metrics
Requests that already contain
target=
are internally forwarded to the probe handler, so users may keeppath: /metrics
in ServiceMonitors if they wish.Per-module API key support
type: apikey
injects theAuthorization: ApiKey …
header for that probe only.Docs & examples
examples/auth_modules.yml
showsuserpass
,apikey
.Unit tests
config
loader round-trip.validateProbeParams
.───────────────────────────────
Compatibility
───────────────────────────────
/metrics
withouttarget=
still returns the startup cluster.───────────────────────────────
Prometheus sample config
───────────────────────────────
───────────────────────────────
Commit outline
───────────────────────────────
Feedback / suggestions welcome!