diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-21 02:39:09 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-21 02:39:09 +0200 |
commit | 113c8f51449c812fac90d43db88eebe977842218 (patch) | |
tree | 92fb9bcd92bafe0221711083cc0d2de36e68cefa /contrib/munin/accounts.py | |
parent | f774c99fb887b7e2ad7c9f0e62efa631d319440d (diff) | |
download | web-113c8f51449c812fac90d43db88eebe977842218.tar.gz web-113c8f51449c812fac90d43db88eebe977842218.tar.bz2 web-113c8f51449c812fac90d43db88eebe977842218.zip |
contrib/munin: moved script
Diffstat (limited to 'contrib/munin/accounts.py')
-rw-r--r-- | contrib/munin/accounts.py | 14 |
1 files changed, 14 insertions, 0 deletions
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)) |