summaryrefslogtreecommitdiffstats
path: root/munin/publik_count_
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-05-27 07:05:49 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-05-27 07:05:49 (GMT)
commit18002c532faf913b854d79e3e492d96ba8800464 (patch)
tree961acd93e0759b6b6901ad258b6834f034c76f2e /munin/publik_count_
parentaf4a5292d86ab7f44dfb83e3e9a27da0d8aeda57 (diff)
downloadmisc-fred-18002c532faf913b854d79e3e492d96ba8800464.zip
misc-fred-18002c532faf913b854d79e3e492d96ba8800464.tar.gz
misc-fred-18002c532faf913b854d79e3e492d96ba8800464.tar.bz2
munin: update for new tenants/ subdirectory
Diffstat (limited to 'munin/publik_count_')
-rwxr-xr-xmunin/publik_count_5
1 files changed, 4 insertions, 1 deletions
diff --git a/munin/publik_count_ b/munin/publik_count_
index 9d0e918..37679a9 100755
--- a/munin/publik_count_
+++ b/munin/publik_count_
@@ -1,6 +1,9 @@
#! /usr/bin/env python
+#%# family=auto
+#%# capabilities=autoconf
import cPickle
+import itertools
import os
import psycopg2
import sys
@@ -29,7 +32,7 @@ total_logged_user_count.label Front by logged user
''' % tenant
sys.exit(0)
-for tenant_dir in os.listdir(base_dir):
+for tenant_dir in itertools.chain(os.listdir(base_dir), os.listdir(os.path.join(base_dir, 'tenants'))):
if tenant_dir != tenant:
continue
cfg = cPickle.load(open(os.path.join(base_dir, tenant, 'config.pck')))