Nextcloud Monitoring via Special Agent

Nextcloud Monitoring via Special Agent

Description

Monitors various aspects of Nextcloud instances like state, quota and disk usage of all users, number of apps with available updates, database php opcache hit rate and so on.
Gives additional information regarding versions of Nextcloud, database, PHP, web server etc.

Caveats:
Tested only with Nextcloud versions 25/26/27/28
Tested only with MySQL/MariaDB as database backend

Please feel free to add other working environments via review.

Upgrade from older MKPs (before 2.4.0):
If you upgrade from a already installed version before 2.4.0, you have to re-create your rules for the "Nextcloud Server Information" (reason: massive parameter changes).
Steps to accomplish this without problems:

  1. Take a screenshot of your settings in the above mentioned ruleset
  2. Assure that you have access to the passwords/tokens you used within the current rules
  3. Delete all rules for "Nextcloud Server Information"
  4. Install and enable the new MKP
  5. Re-create your rules with the previously saved information from steps 1 and 2
  6. Apply your changes

Hint: You have to create an app password now for accessing your Nextcloud instance. For this to accomplish login to your Nextcloud server with an administrative user account. Go to "Personal Settings|Security" and take note of the section "Devices & Sessions". Create the app password via clicking the button "create new app password". You may use this password explicitly within the rule or store it first in the password safe of CheckMK.

General installation instructions:
1. Upload and enable the MKP
2. Apply changes
3. Click Setup, search for "Nextcloud"
4. Click on "Nextcloud Server Information" below "Other integrations"
5. Create a new rule and fill in all mandatory information (Hostname, Username, App Password)
6. Adjust all other options to your needs
7. Bind this rule to your Nextcloud host object (e.g. via "Explicit hosts")
8. If you have no host object at all, create a dummy host for this (with no IP or something like 127.0.0.2)
9. Assure that your agents settings for this host object are correct (must contain "Configured API integrations")
10. Apply your changes
11. Execute a service discovery on your Nextcloud host(s) and accept the newly detected services
12. Feel free to adjust the various parameters for thresholds within the available parameter sections (Setup, "Service monitoring rules" after searching for "Nextcloud")

Version history:
2024/01/13 2.5.2 Due to several user requests: Repackaged only to set the minimum required version CheckMK to 2.1.0p1
2024/01/12 2.5.1 Added versions for apps with available updates
2024/01/12 2.4.1 Removed Parameter "token", switched to parameter "app password" only
2024/01/12 2.4.0 Integrated Password Store for App Password, some changes for compatibility with NC 28 added
2023/11/26 2.3.4 Fixed agent crash if opcache_get_status is disabled by server settings, thanks to Marcus Klein for reporting (and solving!) this bug
2023/08/16: 2.3.3 Fixed some misleading information strings regarding database PHP opcache
2023/08/08: 2.3.2 Now compatible with CheckMK 2.2
2023/03/27: 2.3.1 Fixed several bugs in parameter handling
2023/03/23: 2.2.1 Adjusted parameter handling
Added check for "free space on disk" (incl. adjustable levels)
Added adjustable levels for "number of files"

2023/03/11: 2.2.0 Upload initial public release

Latest Version

Version: 2.5.2
Packaged at: 13 Jan 2024
Created on Checkmk version: 2.2.0p17
Minimum Checkmk version required: 2.1.0p1
MKP MD5 hash: 3e440725ae4e07e74d063293a7eb99cf
This version requires Checkmk version 2.0.0 or higher
Agent Based
  • nextcloud_info.py
  • nextcloud_users.py
  • nextcloud_database.py
Agents
  • special/agent_nextcloud
Check Manuals
  • nextcloud_info
  • nextcloud_users
  • nextcloud_database
Check Plugins
  • agent_nextcloud
GUI Extensions
  • plugins/metrics/nextcloud_metrics.py
  • plugins/perfometer/nextcloud_perfometers.py
  • plugins/wato/nextcloud_info_rules.py
  • plugins/wato/nextcloud_params.py
  • plugins/wato/nextcloud_users_rules.py
  • plugins/wato/nextcloud_database_rules.py
  • Version: 2.5.2
    Packaged at: 13 Jan 2024
    Created on Checkmk version: 2.2.0p17
    Minimum Checkmk version required: 2.1.0p1
    MKP MD5 hash: 3e440725ae4e07e74d063293a7eb99cf
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.5.1
    Packaged at: 12 Jan 2024
    Created on Checkmk version: 2.2.0p17
    Minimum Checkmk version required: 2.2.0p1
    MKP MD5 hash: 84cb173462b6a4cdac010fde4ced4133
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.3.4
    Packaged at: 26 Nov 2023
    Created on Checkmk version: 2.1.0p31
    Minimum Checkmk version required: 2.1.0p19
    MKP MD5 hash: 4a35ba32a60d04cd9e067187bdbca23c
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.3.3
    Packaged at: 16 Aug 2023
    Created on Checkmk version: 2.1.0p31
    Minimum Checkmk version required: 2.1.0p19
    MKP MD5 hash: 4cc8b7be7594fbf002bc7caf0437fe02
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.3.2
    Packaged at: 12 Aug 2023
    Created on Checkmk version: 2.1.0p31
    Minimum Checkmk version required: 2.1.0p19
    MKP MD5 hash: ed379b2114335afaa7b09056f1df2a61
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.3.1
    Packaged at: 27 Mar 2023
    Created on Checkmk version: 2.1.0p25
    Minimum Checkmk version required: 2.1.0p19
    MKP MD5 hash: df8abb41e514875d90c5dd950ee14f18
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.2.1
    Packaged at: 23 Mar 2023
    Created on Checkmk version: 2.1.0p25
    Minimum Checkmk version required: 2.1.0p19
    MKP MD5 hash: f75d22a3912edd2ce2c8defd45f0a8df
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • Version: 2.2.0
    Packaged at: 11 Mar 2023
    Created on Checkmk version: 2.1.0p23
    Minimum Checkmk version required: 2.1.0p19
    MKP MD5 hash: b79e6a2b975b4ec18d279466b9fc7447
    Description:
    Agent Based
    • nextcloud_info.py
    • nextcloud_users.py
    • nextcloud_database.py
    Agents
    • special/agent_nextcloud
    Check Manuals
    • nextcloud_info
    • nextcloud_users
    • nextcloud_database
    Check Plugins
    • agent_nextcloud
    GUI Extensions
    • plugins/metrics/nextcloud_metrics.py
    • plugins/perfometer/nextcloud_perfometers.py
    • plugins/wato/nextcloud_info_rules.py
    • plugins/wato/nextcloud_params.py
    • plugins/wato/nextcloud_users_rules.py
    • plugins/wato/nextcloud_database_rules.py
  • ret1 25-10-2023
    How to install:
    - download & install mkp
    - configure nextcloud credentials in checkmk (Setup > Agents > Other integrations > Nextcloud Server Information)
    - change host settings "Checkmk agent / API integrations" to "Configured API integrations and Checkmk agent" if you want to get data from the nextcloud special agent AND the checkmk agent
  • sedi 26-04-2024
    an awesome package! THANKS! only 1 thing is really really annoying: I have to use a full admin app password with all privileges for just getting stats. this can be totally avoided if you could add NC-Token support instead (https://help.nextcloud.com/t/howto-use-serverinfo-with-curl/173360). Unfortunately there is no way to request such a thing on your gitea instance (no registration possible) so I hope you read it from here..

By downloading packages from the Checkmk Exchange you agree to our Terms of Use.