diff options
author | Alejandro Suarez <alejandroscf@gmail.com> | 2018-10-31 11:42:27 +0100 |
---|---|---|
committer | Alejandro Suarez <alejandroscf@gmail.com> | 2018-10-31 11:42:27 +0100 |
commit | 7134c52ca48451ab3b998d28c0a797aef5df27c0 (patch) | |
tree | 58854e793f2d8ec19627ba9a6bb3963272016f3c | |
parent | 524242c5e88a265d86946eee6eadf9f7ed1f7c74 (diff) |
Monitor total number of users in _users plugin
-rwxr-xr-x | nextcloud_users | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nextcloud_users b/nextcloud_users index 350f14e..45abd43 100755 --- a/nextcloud_users +++ b/nextcloud_users @@ -35,7 +35,10 @@ class NextcloudUsers: 'last1hour.min 0', 'last24hours.label last 24 hours', 'last24hours.info users connected in the last 24 hours', - 'last24hours.min 0' + 'last24hours.min 0', + 'num_users.label number of users', + 'num_users.info total number of users', + 'num_users.min 0' ] } @@ -51,6 +54,10 @@ class NextcloudUsers: # append for every key in users the key and the value to the results [data['nextcloud_users'].append(str(key) + ".value " + str(users[key])) for key in users.keys()] + + #storage + num_users = api_response['ocs']['data']['nextcloud']['storage']['num_users'] + data['nextcloud_users'].append('num_users.value %s' % num_users) return data |