Only include ARCHIVE if superuser.
The ARCHIVE query uses the pg_ls_dir function which requires Superuser permissions.
Facetoe committed
Apr 23, 2017 at 18:51 UTC
dffbfe4ade6ff45e8d3bd2c2a153e717d3a70a18
1 file changed
+1
-1
python.d/postgres.chart.py
+1
-1
@@ -146,7 +146,6 @@ SELECT current_setting('is_superuser') = 'on' AS is_superuser;
146
QUERY_STATS = {
147
QUERIES['DATABASE']: METRICS['DATABASE'],
148
QUERIES['BACKENDS']: METRICS['BACKENDS'],
149
- QUERIES['ARCHIVE']: METRICS['ARCHIVE'],
149
QUERIES['LOCKS']: METRICS['LOCKS']
150
}
151
@@ -300,6 +299,7 @@ class Service(SimpleService):
299
QUERY_STATS[QUERIES['TABLE_STATS']] = METRICS['TABLE_STATS']
300
if is_superuser:
301
QUERY_STATS[QUERIES['BGWRITER']] = METRICS['BGWRITER']
302
+ QUERY_STATS[QUERIES['ARCHIVE']] = METRICS['ARCHIVE']
303
304
def create_dynamic_charts_(self):
305