misc-fred/munin/authentic_count_

22 lines
657 B
Python
Executable File

#! /usr/bin/python3
import os
import sys
tenant = os.path.basename(sys.argv[0]).replace('authentic_count_', '')
if len(sys.argv) == 2 and sys.argv[1] == 'autoconf':
print('yes')
sys.exit(0)
if len(sys.argv) == 2 and sys.argv[1] == 'config':
print('''graph_title Count of users for %s
graph_category entrouvert
total_count.label Total
total_logged_count.label Total once logged
fc_count.label Total FC
''' % tenant)
sys.exit(0)
os.system('machinectl shell authentic.node1.prod.saas.entrouvert.org /usr/bin/authentic2-multitenant-manage tenant_command runscript /home/fred//misc-fred/munin/authentic_count_cmd.py compute -d %s' % tenant)