munin: add custom behaviour for new SaaS database (#30507)

This commit is contained in:
Frédéric Péters 2019-02-19 14:54:10 +01:00
parent e82fb8f632
commit 81c0ec3860
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ for tenant in os.listdir(base_dir):
for k, v in cfg['postgresql'].items():
if v and isinstance(v, basestring):
psql_cfg[k] = v
if psql_cfg.get('host') == 'prod.saas.entrouvert.org.clusters.entrouvert.org':
# override for routing
psql_cfg['host'] = '10.0.0.10'
pgconn = psycopg2.connect(**psql_cfg)
cur = pgconn.cursor()
try: