pg_exporter
pg_exporter copied to clipboard
Built-in metrics definition
Embed a default metrics definition into pg_exporter which support PG 10 - 14.
- Embed static config into binary with Go 1.16 embed
- Add option to disabled default metrics.
- Add option to append new collectors rather than overwrite default collectors.
Please, remove UTF-8 drawing characters (and other weird characters) from literary everywhere in configuration and either replace them with ASCII +-| if you insist on the borders, line, frames etc. or perhaps consider reformating the documentation comments as something like plain Markdown or so... It also bloats the binary and I never understood this "trend" to include "configuration generators" directly in the software. :-1: Would this me possible, please? Thank you.
The exact reason why I would really like you to clean this up is that it caused some issues on some systems (the daemon refused to start) and I had to do semi-manual cleanup of the default configuration (prolonged painful utilization of step-by-step sed -i until the files vere clean-enough for daemon to start and then addition manual "polishing" and reformating because the files, of course, got messed up).
P.S. I can do the clean up for you if you liked but I must be sure the PR would be accepted. Otherwise I am not interested to spend the time on it. :slightly_smiling_face:
- That really make sense. I think using ascii characters instead in next release is a good idea.
- There's a docker image since v0.5, so I guess embeded configuration is no longer needed...
- Of course I would accept this PR and thanks for your contribution 🥳, maybe removing all 'docs' inside collector definition and "Explain" it with API would be better.