From 113c8f51449c812fac90d43db88eebe977842218 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 21 Sep 2012 02:39:09 +0200 Subject: contrib/munin: moved script --- contrib/munin/accounts.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 contrib/munin/accounts.py (limited to 'contrib/munin/accounts.py') diff --git a/contrib/munin/accounts.py b/contrib/munin/accounts.py new file mode 100644 index 0000000..4215f68 --- /dev/null +++ b/contrib/munin/accounts.py @@ -0,0 +1,14 @@ +import sys +from account import * + +if __name__ == "__main__": + + if len(sys.argv) > 1 and sys.argv[1] == 'config': + print('graph_title Splinux') + print('graph_vlabel Amount') + print('accounts.label Accounts') + else: + service = AccountService(LDAP_HOST, LDAP_BASE_DN,SERVICES) + accounts = service.find(LDAP_ADMIN_USER, LDAP_ADMIN_PASS) + + print('accounts.value %s' % len(accounts)) -- cgit v1.2.3-1-g7c22