benvin/grafana_postgres (#334)

Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/334
This commit was merged in pull request #334.
This commit is contained in:
2025-07-01 19:07:24 +10:00
parent 61d912de30
commit a9faa098ee
8 changed files with 115 additions and 51 deletions
+5 -1
View File
@@ -1,7 +1,11 @@
# frozen_string_literal: true
Facter.add(:psql_is_slave) do
confine enc_role: 'roles::infra::sql::patroni'
confine enc_role: [
'roles::infra::sql::patroni',
'roles::infra::sql::shared',
'roles::infra::puppetdb::sql'
]
setcode do
# Command to check if PostgreSQL is in recovery mode
command = 'sudo -iu postgres psql -tAc "select pg_is_in_recovery()"'