Skip to content
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

Discovery for scrape intervals, scheme & paths #910

Closed
jimmidyson opened this Issue Jul 21, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@jimmidyson
Copy link
Member

jimmidyson commented Jul 21, 2015

While adding in Kubernetes discovery in a separate PR, I would like to be able to discover scrape intervals & paths from metadata in Kubernetes & update targets appropriately.

The job config contains details of the intervals/scheme/path & this is configured statically in the Prometheus config file, a restart is required to pick up changes. The only dynamic changes allowed are in target groups, which I can update labels & addresses per target but nothing more.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jul 21, 2015

The best person to discuss this issue is probably @fabxc , but he is on vacation.

@jimmidyson

This comment has been minimized.

Copy link
Member Author

jimmidyson commented Jul 21, 2015

@beorn7 Thanks - will wait for his return.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jul 21, 2015

BTW: sending a SIGHUP reloads the config. If you have some mechanism to rewrite the config, you don't need a restart, just a signal. Might be sufficient for a work-around...

@jimmidyson

This comment has been minimized.

Copy link
Member Author

jimmidyson commented Jul 21, 2015

@beorn7 Ah good tip thanks.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Aug 6, 2015

Sorry for the delay.

The path is already available via __metrics_path__ and can thus be relabeled, i.e. populated from meta labels coming from a service discovery.
I agree that exposing a __scheme__ would be consistent with that.

Now, scrape interval is another beast. It certainly is possible, as many things. But I'm wondering whether scrape intervals are something that should come form service discovery and in which direction this puts us. If people can configure the scrape interval through their SD, naturally requests for the scrape timeout, auth credentials etc. would follow.
We should avoid ending up with a system that is so rich (bloated) in possibilities to operate that it becomes a challenge to figure out a proper setup.

There is no one true answer but unless there is a strong need I'd rather slow down the "everything-relabelable" movement.

@jimmidyson

This comment has been minimized.

Copy link
Member Author

jimmidyson commented Aug 6, 2015

No worries - hope you had a good break.

So where would I relabel __metrics_path? On the target group or target? Sorry I'm not so up on these prometheus concepts, but getting there :)

Agreed adding __scheme__ in the same way makes sense. I can look at a PR for this if I get a moment.

As for scrape intervals, totally understand your reasoning to resist everything-relabelable. Scheme would definitely be enough for us (for now ;)).

@jimmidyson

This comment has been minimized.

Copy link
Member Author

jimmidyson commented Aug 6, 2015

Closing as scheme is now discoverable.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.