Check nextcloud-stats


This plugin lets you track the number of active users over time, the number of shares in various categories and some storage statistics against a Nextcloud server. Might take up to 30 seconds for the first time; after that, still takes a few seconds.

To access the serverinfo API you will need the credentials of an admin user. It is recommended to create an app password (at or a separate user for that purpose.


  • If you simply want to check the availability of the Nextcloud web frontend, you have to use other checks.

  • If a Nextcloud App leads to a „500 Internal Server Error“, the Nextcloud API often still remains intact (so this check can’t report this).

Tested with Nextcloud 15+.

Fact Sheet

Check Plugin Download

Check Interval Recommendation

Every 15 minutes

Can be called without parameters


Compiled for

Linux, Windows


Nextcloud App ‚serverinfo‘


usage: nextcloud-stats [-h] [-V] [--always-ok] [--insecure] [--no-proxy]
                       --password PASSWORD [--url URL] [--username USERNAME]

This plugin lets you track the number of active users over time, the number of
shares in various categories and some storage statistics against a Nextcloud

  -h, --help           show this help message and exit
  -V, --version        show program's version number and exit
  --insecure           This option explicitly allows to perform "insecure" SSL
                       connections. Default: False
  --no-proxy           Do not use a proxy. Default: False
  --password PASSWORD  Nextcloud API password.
  --url URL            Nextcloud API URL. Default: http://localhost/nextcloud/
  --username USERNAME  Nextcloud API username. Default: admin

Usage Examples

./nextcloud-stats --username nextcloud-stats --password mypassword --url http://localhost/nextcloud/ocs/v2.php/apps/serverinfo/api/v1/info


8 users (3/5/7 in the last 5min/1h/24h), 116.4K files, 50 apps, v24.0.8.3
* Shares: 142 (18 groups, 57 links [56 w/o password], 0 mails, 0 rooms, 14 users, 0 federated sent)
* Federated Shares: 0 received
* Storages: 14 (0 home, 14 other, 0 local)
* PHP: v8.1.13, upload_max_filesize=9.8GiB, max_execution_time=3600s, memory_limit=1.0GiB
* DB: mysql v10.6.11, size=148.7MiB
* Web: Apache, local memcache: Memcache\Redis, locking memcache: Memcache\Redis


  • Always returns OK.

Perfdata / Metrics

  • nc_active_users_last5min

  • nc_active_users_last1h

  • nc_active_users_last24h

  • nc_server_database_size

  • nc_shares_num_fed_shares_received

  • nc_shares_num_fed_shares_sent

  • nc_shares_num_shares

  • nc_shares_num_shares_groups

  • nc_shares_num_shares_link

  • nc_shares_num_shares_link_no_password

  • nc_shares_num_shares_mail

  • nc_shares_num_shares_room

  • nc_shares_num_shares_user

  • nc_storage_num_files

  • nc_storage_num_storages

  • nc_storage_num_storages_home

  • nc_storage_num_storages_local

  • nc_storage_num_storages_other

  • nc_storage_num_users: For num_users, the Nexctloud serverinfo app (NC21) returns the number of users that have ever existed, and not those that are enabled. See

  • nc_system_apps_num_installed


Unknown error while fetching http://localhost/nextcloud/ocs/v2.php/apps/serverinfo/api/v1/info?format=json, maybe timeout or error on webserver

Check the Nextcloud API endpoint URL. Maybe change from http(s)://localhost to http(s)://

HTTP error „401 Unauthorized“ while fetching http://

Password is correct? Maybe you enabled 2FA. Use an app password for your monitoring server.

Credits, License