diff options
author | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2012-09-20 13:51:43 +0200 |
---|---|---|
committer | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2012-09-20 14:27:32 +0200 |
commit | e19dc823ee4cba5a2617dbc70073ae3258105d9a (patch) | |
tree | f050ca049ebfb012908bab3ce3d7791981a4da2f | |
parent | eb07f6e414551125a216f8556ffac77010feb60b (diff) | |
download | web-e19dc823ee4cba5a2617dbc70073ae3258105d9a.tar.gz web-e19dc823ee4cba5a2617dbc70073ae3258105d9a.tar.bz2 web-e19dc823ee4cba5a2617dbc70073ae3258105d9a.zip |
Added basic munin plugin
With this plugin its easy to monitor the amounts of accounts over time
-rw-r--r-- | munin.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/munin.py b/munin.py new file mode 100644 index 0000000..4215f68 --- /dev/null +++ b/munin.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)) |