Skip to content

Question on enabling collectors #83

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

Open
dtaraf opened this issue Jul 4, 2018 · 3 comments
Open

Question on enabling collectors #83

dtaraf opened this issue Jul 4, 2018 · 3 comments

Comments

@dtaraf
Copy link

dtaraf commented Jul 4, 2018

Hello,

I have been using a dot config file to enable collectors for prometheus and its working well for me. However if I wanted to enable / disable collectors in a more dynamic way, say having a web page from which I could select a collector and click a button called enabled or disable it similarly, so that no more metrices are sent to prometheus, is that something that can be done ? If so then can some pointers be given as to how to go about it roughly, what api I should be looking at etc ?

Thanks !
Devangana

@deadtrickster
Copy link
Collaborator

Hello, you can dynamically register and deregister collectors using functions from prometheus_registry module - https://github.com/deadtrickster/prometheus.erl/blob/master/doc/prometheus_registry.md. Its collectors function will return all registered collectors for particular registry.

@dtaraf
Copy link
Author

dtaraf commented Jul 4, 2018

Thank you , will try these out!

@marco-m
Copy link

marco-m commented Jan 7, 2019

it looks like this ticket can be closed :-)

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

No branches or pull requests

3 participants