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

Added default registry to write_to_file #39

Conversation

barkerd427
Copy link

@brian-brazil: This is needed to use the default registry with the write_to_file function. I have tested this locally.

@brian-brazil
Copy link
Contributor

The push gateway is intended primarily for use by batch and other ephemeral jobs where a limited number of metrics are pushed, thus having all metrices being pushed is not a good default as it is not in line with the prometheus architecture and has pitfalls that aren't obvious to the casual user.

It's still possible for you to do this by hand though as REGISTRY is publically exposed.

@barkerd427
Copy link
Author

This is for the node_exporter. It looked like the push gateway was already taking the default registry if none was provided. I'm not familiar enough with python to get it directly. Could you show me and maybe I can add that back for the docs or write a blog post describing my use-case.

@brian-brazil
Copy link
Contributor

Hmm, that's a bad default. I should fix that.

The same applies to the textfile collector, but more so as if you've two jobs writing the standard exports to be read it'll break your metrics collection. These examples of how to use this in the README of this repository, but you definitely don't want to use the default registry with write_to_file.

@barkerd427
Copy link
Author

I see now. Thanks for the help.

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.

None yet

2 participants