Added default registry to write_to_file#39
Conversation
|
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 |
|
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. |
|
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 |
|
I see now. Thanks for the help. |
@brian-brazil: This is needed to use the default registry with the write_to_file function. I have tested this locally.