Vonng / pg_exporter

Advanced PostgreSQL & Pgbouncer Metrics Exporter for Prometheus
https://pigsty.io
Apache License 2.0
164 stars 42 forks source link

Add Column.Scale to multiply a factor to scraped metrics #18

Closed Vonng closed 2 years ago

Vonng commented 3 years ago

It would be convenient to have the ability to scale metric value by a center factor.

E.g The origin metric is in µs , while common practice was transform those metrics into standard unit. such as second.

It would be annoying to do so in original raw SQL. But would be great to do it in configuration.

    - exec_time:
        usage: COUNTER
        scale: 1e-6
        description: Total time spent executing the statement, in µs
Vonng commented 2 years ago

resolved by v0.5.0