From 7134c52ca48451ab3b998d28c0a797aef5df27c0 Mon Sep 17 00:00:00 2001 From: Alejandro Suarez Date: Wed, 31 Oct 2018 11:42:27 +0100 Subject: Monitor total number of users in _users plugin --- nextcloud_users | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nextcloud_users') 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 -- cgit v1.2.3-54-g00ecf From 1163227c67548a1a41bfe4c9ba407a85a865a4c4 Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 1 Nov 2018 19:16:39 +0100 Subject: Update nextcloud_users Co-Authored-By: alejandroscf --- nextcloud_users | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nextcloud_users') diff --git a/nextcloud_users b/nextcloud_users index 45abd43..c9462d0 100755 --- a/nextcloud_users +++ b/nextcloud_users @@ -36,7 +36,9 @@ class NextcloudUsers: 'last24hours.label last 24 hours', 'last24hours.info users connected in the last 24 hours', 'last24hours.min 0', - 'num_users.label number of users', + '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' ] -- cgit v1.2.3-54-g00ecf From e3ae0935fad1e8142093280e88bdcba0231222b8 Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 1 Nov 2018 19:16:52 +0100 Subject: Update nextcloud_users Co-Authored-By: alejandroscf --- nextcloud_users | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nextcloud_users') diff --git a/nextcloud_users b/nextcloud_users index c9462d0..a577610 100755 --- a/nextcloud_users +++ b/nextcloud_users @@ -57,7 +57,8 @@ class NextcloudUsers: [data['nextcloud_users'].append(str(key) + ".value " + str(users[key])) for key in users.keys()] - #storage + #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) -- cgit v1.2.3-54-g00ecf