Skip to content

Commit 9d15392

Browse files
authored
Merge pull request #62 from cybertec-postgresql/monitoring_fix_pgbackrest
Monitoring fix pgbackrest
2 parents a3a1771 + 13de4eb commit 9d15392

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/cluster/database.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ const (
9797
ALTER SCHEMA exporter OWNER TO cpo_exporter;
9898
CREATE EXTENSION IF NOT EXISTS pgnodemx with SCHEMA exporter;
9999
alter extension pgnodemx UPDATE;
100-
CREATE TABLE IF NOT EXISTS exporter.pgbackrestbackupinfo (
100+
CREATE TABLE IF NOT EXISTS exporter.pgbackrestbackupinfo (
101101
data jsonb NOT NULL,
102102
data_time timestamp with time zone DEFAULT now() NOT NULL
103103
)
104104
WITH (autovacuum_analyze_scale_factor='0', autovacuum_vacuum_scale_factor='0', autovacuum_vacuum_threshold='2', autovacuum_analyze_threshold='2');
105105
ALTER TABLE exporter.pgbackrestbackupinfo OWNER TO cpo_exporter;
106106
107+
GRANT pg_execute_server_program TO cpo_exporter;
108+
107109
CREATE OR REPLACE FUNCTION exporter.update_pgbackrest_info()
108110
RETURNS VOID AS $$
109111
DECLARE
@@ -131,7 +133,6 @@ const (
131133
);
132134
END;
133135
$$ LANGUAGE plpgsql;
134-
135136
`
136137
)
137138

0 commit comments

Comments
 (0)