diff options
author | nico <nico@magicbroccoli.de> | 2018-11-13 01:27:10 +0100 |
---|---|---|
committer | nico <nico@magicbroccoli.de> | 2018-11-13 01:28:25 +0100 |
commit | b0f3e3d72b1922e87d82aeaec19a40d9f829bb20 (patch) | |
tree | 8abcdbeec1790d4becac6475ffac5efc70d95e04 /nextcloud_users | |
parent | a1027ff7736c5fb20932520a26150a7d19e64809 (diff) |
add total user count to multigraph plugin
- remove doubled config lines in _users config
+ added total user count to multigraph plugin
* variable assignment cleanup
* improved code comment
still related to #2
Diffstat (limited to 'nextcloud_users')
-rwxr-xr-x | nextcloud_users | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nextcloud_users b/nextcloud_users index f68543e..b2c651d 100755 --- a/nextcloud_users +++ b/nextcloud_users @@ -38,8 +38,6 @@ class NextcloudUsers: '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' ] } @@ -52,13 +50,13 @@ class NextcloudUsers: } # users users = api_response['ocs']['data']['activeUsers'] + num_users = api_response['ocs']['data']['nextcloud']['storage']['num_users'] # 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'] + # append total number of users data['nextcloud_users'].append('num_users.value %s' % num_users) return data |