aboutsummaryrefslogtreecommitdiffstats
path: root/nextcloud_users
diff options
context:
space:
mode:
authornico <nico.wellpott@uni-oldenburg.de>2018-11-13 01:09:56 +0100
committerGitHub <noreply@github.com>2018-11-13 01:09:56 +0100
commit4617b3009c09e89c77b34985de702bdca4f0617f (patch)
tree6c4d4aafe9c4cd9da65be25a4242153597ce3657 /nextcloud_users
parent524242c5e88a265d86946eee6eadf9f7ed1f7c74 (diff)
parente3ae0935fad1e8142093280e88bdcba0231222b8 (diff)
Merge pull request #2 from alejandroscf/feature/users
+ add total number of users to nextcloud_users plugin
Diffstat (limited to 'nextcloud_users')
-rwxr-xr-xnextcloud_users12
1 files changed, 11 insertions, 1 deletions
diff --git a/nextcloud_users b/nextcloud_users
index 350f14e..a577610 100755
--- a/nextcloud_users
+++ b/nextcloud_users
@@ -35,7 +35,12 @@ 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'
+ 'num_users.info total number of users',
+ 'num_users.min 0'
]
}
@@ -51,6 +56,11 @@ 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
+ data['nextcloud_users'].append('num_users.value %s' % num_users)
+ num_users = api_response['ocs']['data']['nextcloud']['storage']['num_users']
+ data['nextcloud_users'].append('num_users.value %s' % num_users)
return data