summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-02-19 13:54:10 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-02-19 13:54:28 (GMT)
commit81c0ec3860445a47b02dba20ff21d663a65cdd0b (patch)
tree634fc4108bdf5ae7aeb04c292247c9f9ef85caea
parente82fb8f63217513d2d8f8acb14aa6ee9d197516e (diff)
downloadmisc-fred-81c0ec3860445a47b02dba20ff21d663a65cdd0b.zip
misc-fred-81c0ec3860445a47b02dba20ff21d663a65cdd0b.tar.gz
misc-fred-81c0ec3860445a47b02dba20ff21d663a65cdd0b.tar.bz2
munin: add custom behaviour for new SaaS database (#30507)
-rwxr-xr-xmunin/publik_count3
1 files changed, 3 insertions, 0 deletions
diff --git a/munin/publik_count b/munin/publik_count
index 9d93fce..134e968 100755
--- a/munin/publik_count
+++ b/munin/publik_count
@@ -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: