Describe available metrics
A description of the available metrics would be very helpful. Or maybe a link.
Many thanks Philip
The trouble with a list like this is that it is hard to keep up to date. Contributors not familiar with the project may not know or forget to add new metrics to the list when submitting a PR. It's an easy item to forget even for maintainers. I'm not opposed to adding one however. I wish there was an easy way to have the code automatically generate this list.
I wish there was an easy way to have the code automatically generate this list.
Why not adding a subcommand? postgres_exporter list_metrics that dumps metrics and descriptions on stdout?
Basically this : https://github.com/prometheus-community/postgres_exporter/blob/c84fc4a13a414af7af9da3335e5e3e6653b10215/cmd/postgres_exporter/postgres_exporter.go#L165
@n-rodriguez The reason we can't just dump that map is because it's only part of the metrics that the exporter implements. Many metrics are not part of that map and I haven't found a good way to dump the metrics. A subcommand would need to register the metrics first which would be dependent on cli flags (to enable or disable collectors) and possibly not created before the first scrape.
It could also be nice to link a demo implementation with a public grafana, an exporter with all the collectors enabled and some test database with some non-sensitive data (perhaps some postgresql database used for unit testing in some project?). Then listing all the metrics would only be a matter of a simple PromQL query.
@nemobis That is something we could try with the Prometheus demo site.
https://github.com/prometheus/demo-site
We're in need of maintainers to keep it running.