{"id":15051340,"url":"https://github.com/nextcloud/serverinfo","last_synced_at":"2025-04-04T09:09:29.542Z","repository":{"id":9964081,"uuid":"63685607","full_name":"nextcloud/serverinfo","owner":"nextcloud","description":"📊 A monitoring app which creates a server info dashboard for admins","archived":false,"fork":false,"pushed_at":"2025-03-27T01:45:28.000Z","size":5494,"stargazers_count":103,"open_issues_count":38,"forks_count":65,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T08:08:55.391Z","etag":null,"topics":["admin-tools","hacktoberfest","monitoring","nextcloud"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-19T10:45:48.000Z","updated_at":"2025-03-27T01:45:26.000Z","dependencies_parsed_at":"2023-11-23T14:25:50.632Z","dependency_job_id":"d9764dc9-fdbe-40d2-8ace-b657f652695d","html_url":"https://github.com/nextcloud/serverinfo","commit_stats":null,"previous_names":[],"tags_count":764,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fserverinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fserverinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fserverinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fserverinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextcloud","download_url":"https://codeload.github.com/nextcloud/serverinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149502,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-tools","hacktoberfest","monitoring","nextcloud"],"created_at":"2024-09-24T21:33:39.834Z","updated_at":"2025-04-04T09:09:29.521Z","avatar_url":"https://github.com/nextcloud.png","language":"JavaScript","readme":"\u003c!--\n - SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\u003e\n# Monitoring\n\n[![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/serverinfo)](https://api.reuse.software/info/github.com/nextcloud/serverinfo)\n\nThis apps provides useful server information, such as CPU load, RAM usage,\ndisk usage, number of users, etc. Check out the provided **Example XML output**\nfor the details.\n\nThe admin can look up this information directly in Nextcloud (Settings -\u003e\nManagement-\u003e Information) or connect an external monitoring tool to the\nprovided end-points.\n\n## Installation\n\nThis app is part of the standard Nextcloud package and can be found in the\ndirectory **nextcloud/apps/serverinfo**\n\n## API\n\nThe API provides a lot of information about a running Nextcloud\ninstance in XML or JSON format by using the following URL.\n\n```\nhttps://\u003cnextcloud-fqdn\u003e/ocs/v2.php/apps/serverinfo/api/v1/info\n```\n\n- To request the information in JSON append the url parameter `format=json`\n- Use the url parameter `skipUpdate=true` to omit server updates.\n- Use the url parameter `skipApps=true` to omit app updates (including available app updates will send an external request to the app store).\n\n### Example XML output:\n```\n\u003c?xml version=\"1.0\"?\u003e\n\u003cocs\u003e\n\t\u003cmeta\u003e\n\t\t\u003cstatus\u003eok\u003c/status\u003e\n\t\t\u003cstatuscode\u003e200\u003c/statuscode\u003e\n\t\t\u003cmessage\u003eOK\u003c/message\u003e\n\t\u003c/meta\u003e\n\t\u003cdata\u003e\n\t\t\u003cnextcloud\u003e\n\t\t\t\u003csystem\u003e\n\t\t\t\t\u003cversion\u003e30.0.0.1\u003c/version\u003e\n\t\t\t\t\u003ctheme/\u003e\n\t\t\t\t\u003cenable_avatars\u003eyes\u003c/enable_avatars\u003e\n\t\t\t\t\u003cenable_previews\u003eyes\u003c/enable_previews\u003e\n\t\t\t\t\u003cmemcache.local\u003eOC\\Memcache\\APCu\u003c/memcache.local\u003e\n\t\t\t\t\u003cmemcache.distributed\u003enone\u003c/memcache.distributed\u003e\n\t\t\t\t\u003cfilelocking.enabled\u003eyes\u003c/filelocking.enabled\u003e\n\t\t\t\t\u003cmemcache.locking\u003eOC\\Memcache\\Redis\u003c/memcache.locking\u003e\n\t\t\t\t\u003cdebug\u003eno\u003c/debug\u003e\n\t\t\t\t\u003cfreespace\u003e48472801280\u003c/freespace\u003e\n\t\t\t\t\u003ccpuload\u003e\n\t\t\t\t\t\u003celement\u003e1.81\u003c/element\u003e\n\t\t\t\t\t\u003celement\u003e1.39\u003c/element\u003e\n\t\t\t\t\t\u003celement\u003e1.24\u003c/element\u003e\n\t\t\t\t\u003c/cpuload\u003e\n\t\t\t\t\u003cmem_total\u003e8183664\u003c/mem_total\u003e\n\t\t\t\t\u003cmem_free\u003e5877568\u003c/mem_free\u003e\n\t\t\t\t\u003cswap_total\u003e0\u003c/swap_total\u003e\n\t\t\t\t\u003cswap_free\u003e0\u003c/swap_free\u003e\n\t\t\t\t\u003capps\u003e\n\t\t\t\t\t\u003c!-- only with skipApps=false --\u003e\n\t\t\t\t\t\u003cnum_installed\u003e53\u003c/num_installed\u003e\n\t\t\t\t\t\u003cnum_updates_available\u003e1\u003c/num_updates_available\u003e\n\t\t\t\t\t\u003capp_updates\u003e\n\t\t\t\t\t\t\u003cfiles_antivirus\u003e2.0.1\u003c/files_antivirus\u003e\n\t\t\t\t\t\u003c/app_updates\u003e\n\t\t\t\t\u003c/apps\u003e\n\t\t\t\t\u003cupdate\u003e\n\t\t\t\t\t\u003c!-- only with skipUpdate=false --\u003e\n\t\t\t\t\t\u003clastupdatedat\u003e1719244666\u003c/lastupdatedat\u003e\n\t\t\t\t\t\u003cavailable/\u003e\n\t\t\t\t\u003c/update\u003e\n\t\t\t\u003c/system\u003e\n\t\t\t\u003cstorage\u003e\n\t\t\t\t\u003cnum_users\u003e7\u003c/num_users\u003e\n\t\t\t\t\u003cnum_files\u003e708860\u003c/num_files\u003e\n\t\t\t\t\u003cnum_storages\u003e125\u003c/num_storages\u003e\n\t\t\t\t\u003cnum_storages_local\u003e7\u003c/num_storages_local\u003e\n\t\t\t\t\u003cnum_storages_home\u003e7\u003c/num_storages_home\u003e\n\t\t\t\t\u003cnum_storages_other\u003e111\u003c/num_storages_other\u003e\n\t\t\t\u003c/storage\u003e\n\t\t\t\u003cshares\u003e\n\t\t\t\t\u003cnum_shares\u003e1\u003c/num_shares\u003e\n\t\t\t\t\u003cnum_shares_user\u003e0\u003c/num_shares_user\u003e\n\t\t\t\t\u003cnum_shares_groups\u003e0\u003c/num_shares_groups\u003e\n\t\t\t\t\u003cnum_shares_link\u003e0\u003c/num_shares_link\u003e\n\t\t\t\t\u003cnum_shares_link_no_password\u003e0\u003c/num_shares_link_no_password\u003e\n\t\t\t\t\u003cnum_fed_shares_sent\u003e0\u003c/num_fed_shares_sent\u003e\n\t\t\t\t\u003cnum_fed_shares_received\u003e0\u003c/num_fed_shares_received\u003e\n\t\t\t\t\u003cpermissions_4_1\u003e1\u003c/permissions_4_1\u003e\n\t\t\t\u003c/shares\u003e\n\t\t\u003c/nextcloud\u003e\n\t\t\u003cserver\u003e\n\t\t\t\u003cwebserver\u003eApache/2.4\u003c/webserver\u003e\n\t\t\t\u003cphp\u003e\n\t\t\t\t\u003cversion\u003e7.2.14\u003c/version\u003e\n\t\t\t\t\u003cmemory_limit\u003e536870912\u003c/memory_limit\u003e\n\t\t\t\t\u003cmax_execution_time\u003e3600\u003c/max_execution_time\u003e\n\t\t\t\t\u003cupload_max_filesize\u003e535822336\u003c/upload_max_filesize\u003e\n\t\t\t\u003c/php\u003e\n\t\t\t\u003cdatabase\u003e\n\t\t\t\t\u003ctype\u003emysql\u003c/type\u003e\n\t\t\t\t\u003cversion\u003e10.2.21\u003c/version\u003e\n\t\t\t\t\u003csize\u003e331382784\u003c/size\u003e\n\t\t\t\u003c/database\u003e\n\t\t\u003c/server\u003e\n\t\t\u003cactiveUsers\u003e\n\t\t\t\u003clast5minutes\u003e2\u003c/last5minutes\u003e\n\t\t\t\u003clast1hour\u003e4\u003c/last1hour\u003e\n\t\t\t\u003clast24hours\u003e5\u003c/last24hours\u003e\n\t\t\u003c/activeUsers\u003e\n\t\u003c/data\u003e\n\u003c/ocs\u003e\n\n```\n\n### Example JSON output:\n```json\n{\"ocs\":{\"meta\":{\"status\":\"ok\",\"statuscode\":200,\"message\":\"OK\"},\"data\":{\"nextcloud\":{\"system\":{\"version\":\"30.0.0.1\",\"theme\":\"\",\"enable_avatars\":\"yes\",\"enable_previews\":\"yes\",\"memcache.local\":\"OC\\\\Memcache\\\\APCu\",\"memcache.distributed\":\"none\",\"filelocking.enabled\":\"yes\",\"memcache.locking\":\"OC\\\\Memcache\\\\Redis\",\"debug\":\"no\",\"freespace\":48472944640,\"cpuload\":[0.84999999999999997779553950749686919152736663818359375,1.04000000000000003552713678800500929355621337890625,1.1699999999999999289457264239899814128875732421875],\"mem_total\":8183664,\"mem_free\":5877156,\"swap_total\":0,\"swap_free\":0,\"apps\":{\"num_installed\":53,\"num_updates_available\":1,\"app_updates\":{\"files_antivirus\":\"2.0.1\"}}},\"storage\":{\"num_users\":7,\"num_files\":708860,\"num_storages\":125,\"num_storages_local\":7,\"num_storages_home\":7,\"num_storages_other\":111},\"shares\":{\"num_shares\":1,\"num_shares_user\":0,\"num_shares_groups\":0,\"num_shares_link\":0,\"num_shares_link_no_password\":0,\"num_fed_shares_sent\":0,\"num_fed_shares_received\":0,\"permissions_4_1\":\"1\"}},\"server\":{\"webserver\":\"Apache\\/2.4\",\"php\":{\"version\":\"7.2.14\",\"memory_limit\":536870912,\"max_execution_time\":3600,\"upload_max_filesize\":535822336},\"database\":{\"type\":\"mysql\",\"version\":\"10.2.21\",\"size\":331382784}},\"activeUsers\":{\"last5minutes\":2,\"last1hour\":3,\"last24hours\":5}}}}\n```\n\n## Configuration\n\n##### Background job to update storage statistics\n\nSince collecting storage statistics might take time and cause slow downs, they are updated in the background. A background job runs once every three hours to update the number of storages and files. The interval can be overridden per app settings (the value is specified in seconds):\n\n``php occ config:app:set --value=3600 serverinfo job_interval_storage_stats``\n\nIt is also possible to trigger the update manually per occ call. With verbose mode enabled, the current values are being printed.\n\n```\nphp occ serverinfo:update-storage-statistics -v --output=json_pretty\n{\n    \"num_users\": 80,\n    \"num_files\": 3934,\n    \"num_storages\": 2545,\n    \"num_storages_local\": 2,\n    \"num_storages_home\": 2510,\n    \"num_storages_other\": 33\n}\n```\n\n##### Restricted mode (\u003e= Nextcloud 28)\n\nTo obtain information about your server, the serverinfo app reads files outside the application directory (e.g. /proc on Linux) or executes shell commands (e.g. df on Linux). \n\nIf you don't want that (for example, to avoid open_basedir warnings) enable the restricted mode.\n\nEnable:\n\n``php occ config:app:set --value=yes serverinfo restricted_mode``\n\nDisable:\n\n``php occ config:app:delete serverinfo restricted_mode``\n\n##### Show phpinfo (\u003e= Nextcloud 28)\n\nEnable:\n\n``php occ config:app:set --value=yes serverinfo phpinfo``\n\nDisable:\n\n``php occ config:app:delete serverinfo phpinfo``\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fserverinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextcloud%2Fserverinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fserverinfo/lists"}