summaryrefslogtreecommitdiffstats
path: root/contrib/munin/accounts.py
diff options
context:
space:
mode:
authorMarian Sigler <m@qjym.de>2012-09-21 02:50:05 +0200
committerMarian Sigler <m@qjym.de>2012-09-21 02:50:05 +0200
commit71ce07733bfbfac18e93dfd5fed3b8d513bf5158 (patch)
treee9b8ac54c937d0d8893c82e732e7e733b2d11de5 /contrib/munin/accounts.py
parentdb849d334158c277d730f01fb9424f92cd421d58 (diff)
parent9cef74c3eca6c18ddcb69ec0ab76aee60bb9c761 (diff)
downloadweb-71ce07733bfbfac18e93dfd5fed3b8d513bf5158.tar.gz
web-71ce07733bfbfac18e93dfd5fed3b8d513bf5158.tar.bz2
web-71ce07733bfbfac18e93dfd5fed3b8d513bf5158.zip
Merge branch 'master' of ssh://git.spline.de/account-web
Diffstat (limited to 'contrib/munin/accounts.py')
-rw-r--r--contrib/munin/accounts.py14
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))