This repository was archived by the owner on Nov 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 22
33A Prometheus exporter for some postgresql metrics.
44
5+ ## Getting Started
6+
57You can add as many database connections as you like to the
68` config.yml ` file, and run it with:
79
810``` console
911./postgresql_exporter -config=my/config.yml
1012```
1113
14+ Some stats are hidden from normal database users, so you must grant acess to that:
15+
16+ ``` sql
17+ GRANT pg_monitor to my_monitor_user;
18+ ```
19+
1220Then you can add hostname:9111 to the prometheus scrapes config:
1321
1422``` yml
@@ -25,4 +33,4 @@ graph and alert on them.
2533
2634` ` ` console
2735docker run -p 9111 -v /path/to/my/config.yml:/config.yml caninjas/postgresql_exporter
28- ```
36+ ```
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ func (g *Gauges) SlowestQueries() *prometheus.GaugeVec {
2828 },
2929 []string {"query" },
3030 )
31- if ! g .isSuperuser {
32- log .Warn ("postgresql_slowest_queries disabled because it requires a superuser to see queries from other users" )
33- return gauge
34- }
3531 if ! g .hasExtension ("pg_stat_statements" ) {
3632 log .Warn ("postgresql_slowest_queries disabled because pg_stat_statements extension is not installed" )
3733 return gauge
You can’t perform that action at this time.
0 commit comments