Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/nextcloud?at=release/7.0
Nextcloud by HTTP
Overview
This template is designed for monitoring Nextcloud by HTTP via Zabbix, and it works without any external scripts.
Nextcloud is a suite of client-server software for creating and using file hosting services.
For more information, see the official documentation
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- Nextcloud ver. 27.0.1
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Set macros {$NEXTCLOUD.USER.NAME}
, {$NEXTCLOUD.USER.PASSWORD}
, {$NEXTCLOUD.ADDRESS}
.
The user must be included in the Administrators group.
Macros used
Name | Description | Default |
---|---|---|
{$NEXTCLOUD.SCHEMA} | HTTP or HTTPS protocol of Nextcloud. |
https |
{$NEXTCLOUD.USER.NAME} | Nextcloud username. |
root |
{$NEXTCLOUD.USER.PASSWORD} | Nextcloud user password. |
<Put the password here> |
{$NEXTCLOUD.ADDRESS} | IP or DNS name of Nextcloud server. |
127.0.0.1 |
{$NEXTCLOUD.LLD.FILTER.USER.MATCHES} | Filter of discoverable users by name. |
.* |
{$NEXTCLOUD.LLD.FILTER.USER.NOT_MATCHES} | Filter to exclude discovered users by name. |
CHANGE_IF_NEEDED |
{$NEXTCLOUD.USER.QUOTA.PUSED.MAX} | Storage utilization threshold. |
90 |
{$NEXTCLOUD.USER.MAX.INACTIVE} | How many days a user can be inactive. |
30 |
{$NEXTCLOUD.CPU.LOAD.MAX} | CPU load threshold (the number of processes in the system run queue). |
95 |
{$NEXTCLOUD.MEM.PUSED.MAX} | Memory utilization threshold. |
90 |
{$NEXTCLOUD.SWAP.PUSED.MAX} | Swap utilization threshold. |
90 |
{$NEXTCLOUD.PHP.MEM.PUSED.MAX} | PHP memory utilization threshold. |
90 |
{$NEXTCLOUD.STORAGE.FREE.MIN} | Free space threshold. |
1G |
{$NEXTCLOUD.PROXY} | Proxy HTTP(S) address. |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Get server information | This item provides useful server information, such as CPU load, RAM usage, disk usage, number of users, etc. https://github.com/nextcloud/serverinfo |
HTTP agent | nextcloud.serverinfo.get_data Preprocessing
|
Server information status | Server information API status |
Dependent item | nextcloud.serverinfo.status Preprocessing
|
Version | Nextcloud service version. |
Dependent item | nextcloud.serverinfo.version Preprocessing
|
Free space | The amount of free disk space. |
Dependent item | nextcloud.serverinfo.freespace Preprocessing
|
CPU load, avg 1m | The average system load (the number of processes in the system run queue), last 1 minute. |
Dependent item | nextcloud.serverinfo.cpu.avg.1m Preprocessing
|
CPU load, avg 5m | The average system load (the number of processes in the system run queue), last 5 minutes. |
Dependent item | nextcloud.serverinfo.cpu.avg.5m Preprocessing
|
CPU load, avg 15m | The average system load (the number of processes in the system run queue), last 15 minutes. |
Dependent item | nextcloud.serverinfo.cpu.avg.15m Preprocessing
|
Memory total | The size of the RAM. |
Dependent item | nextcloud.serverinfo.mem.total Preprocessing
|
Memory free | The amount of free RAM. |
Dependent item | nextcloud.serverinfo.mem.free Preprocessing
|
Memory used, in % | RAM usage, in percent. |
Dependent item | nextcloud.serverinfo.mem.pused Preprocessing
|
Swap total | The size of the swap memory. |
Dependent item | nextcloud.serverinfo.swap.total Preprocessing
|
Swap free | The amount of free swap. |
Dependent item | nextcloud.serverinfo.swap.free Preprocessing
|
Swap used, in % | Swap usage, in percent. |
Dependent item | nextcloud.serverinfo.swap.pused Preprocessing
|
Apps installed | The number of installed applications. |
Dependent item | nextcloud.serverinfo.apps.installed Preprocessing
|
Apps update available | The number of applications for which an update is available. |
Dependent item | nextcloud.serverinfo.apps.update Preprocessing
|
Web server | Web server description. |
Dependent item | nextcloud.serverinfo.apps.webserver Preprocessing
|
PHP version | PHP version |
Dependent item | nextcloud.serverinfo.php.version Preprocessing
|
PHP memory limit | By default, the PHP memory limit is generally set to 128 MB, but it can be customized based on the application's specific needs. The php.ini file is usually the standard location to set the PHP memory limit. |
Dependent item | nextcloud.serverinfo.php.memory.limit Preprocessing
|
PHP memory used | PHP memory used |
Dependent item | nextcloud.serverinfo.php.memory.used Preprocessing
|
PHP memory free | PHP free memory size. |
Dependent item | nextcloud.serverinfo.php.memory.free Preprocessing
|
PHP memory wasted | Memory allocated to the service but not in use. |
Dependent item | nextcloud.serverinfo.php.memory.wasted Preprocessing
|
PHP memory wasted, in % | Memory allocated to the service but not in use, in percent. |
Dependent item | nextcloud.serverinfo.php.memory.wasted_percentage Preprocessing
|
PHP memory used, in % | PHP memory used percentage |
Dependent item | nextcloud.serverinfo.php.memory.pused Preprocessing
|
PHP maximum execution time | By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script runs for longer than 30 seconds, PHP stops the script and reports an error. You can control the amount of time PHP allows scripts to run by changing the 'max_execution_time' directive in your php.ini file. |
Dependent item | nextcloud.serverinfo.php.max_execution_time Preprocessing
|
PHP maximum upload file size | By default, the maximum upload file size for PHP scripts is set to 128 megabytes. However, you may want to change this limit. For example, you can set a lower limit to prevent users from uploading large files to your site. To do this, change the 'upload_max_filesize' and 'post_max_size' directives. |
Dependent item | nextcloud.serverinfo.php.upload_max_filesize Preprocessing
|
Database type | Database type. |
Dependent item | nextcloud.serverinfo.db.type Preprocessing
|
Database version | Database description. |
Dependent item | nextcloud.serverinfo.db.version Preprocessing
|
Database size | Size of database. |
Dependent item | nextcloud.serverinfo.db.size Preprocessing
|
Active users, last 5 minutes | The number of active users in the last 5 minutes. |
Dependent item | nextcloud.serverinfo.active_users.last5m Preprocessing
|
Active users, last 1 hour | The number of active users in the last 1 hour. |
Dependent item | nextcloud.serverinfo.active_users.last1h Preprocessing
|
Active users, last 24 hours | The number of active users in the last day. |
Dependent item | nextcloud.serverinfo.active_users.last24hours Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Server information unavailable | Failed to get server information. |
last(/Nextcloud by HTTP/nextcloud.serverinfo.status)<>"OK" |
High | |
Version has changed | Nextcloud version has changed. Acknowledge to close the problem manually. |
change(/Nextcloud by HTTP/nextcloud.serverinfo.version)=1 and length(last(/Nextcloud by HTTP/nextcloud.serverinfo.version))>0 |
Info | Manual close: Yes |
Disk space is low | Condition should be the following: |
last(/Nextcloud by HTTP/nextcloud.serverinfo.freespace)<{$NEXTCLOUD.STORAGE.FREE.MIN} |
Average | Manual close: Yes |
CPU load is too high | High CPU load. |
min(/Nextcloud by HTTP/nextcloud.serverinfo.cpu.avg.1m,5m) > {$NEXTCLOUD.CPU.LOAD.MAX} |
Average | |
High memory utilization | The system is running out of free memory. |
min(/Nextcloud by HTTP/nextcloud.serverinfo.mem.pused,5m) > {$NEXTCLOUD.MEM.PUSED.MAX} |
Average | |
High swap utilization | The system is running out of free swap. |
min(/Nextcloud by HTTP/nextcloud.serverinfo.swap.pused,5m) > {$NEXTCLOUD.SWAP.PUSED.MAX} |
Average | |
Number of installed apps has been changed | Applications have been installed or removed. |
change(/Nextcloud by HTTP/nextcloud.serverinfo.apps.installed)<>0 |
Info | Manual close: Yes |
Application updates are available | Updates are available for some of the installed applications. |
last(/Nextcloud by HTTP/nextcloud.serverinfo.apps.update)<>0 |
Warning | Manual close: Yes |
PHP version has changed | The PHP version has changed. Acknowledge to close the problem manually. |
change(/Nextcloud by HTTP/nextcloud.serverinfo.php.version)=1 and length(last(/Nextcloud by HTTP/nextcloud.serverinfo.php.version))>0 |
Info | Manual close: Yes |
High PHP memory utilization | The PHP is running out of free memory. |
min(/Nextcloud by HTTP/nextcloud.serverinfo.php.memory.pused,5m) > {$NEXTCLOUD.PHP.MEM.PUSED.MAX} |
Average | |
Database version has changed | The Database version has changed. Acknowledge to close the problem manually. |
change(/Nextcloud by HTTP/nextcloud.serverinfo.db.version)=1 and length(last(/Nextcloud by HTTP/nextcloud.serverinfo.db.version))>0 |
Info | Manual close: Yes |
LLD rule Nextcloud: User discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
Nextcloud: User discovery | User discovery. |
HTTP agent | nextcloud.user.discovery Preprocessing
|
Item prototypes for Nextcloud: User discovery
Name | Description | Type | Key and additional info |
---|---|---|---|
User "{#NEXTCLOUD.USER}": Get data | Get common information about user |
HTTP agent | nextcloud.user.get_data[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Status | User account status. |
Dependent item | nextcloud.user.enabled[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Storage location | The location of the user's store. |
Dependent item | nextcloud.user.storageLocation[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Last login | The time the user has last logged in. |
Dependent item | nextcloud.user.lastLogin[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Last login, days ago | The number of days since the user has last logged in. |
Dependent item | nextcloud.user.inactive[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Quota free space | The size of the free available space in the user's storage. |
Dependent item | nextcloud.user.quota.free[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Quota used space | The size of the used available space in the user storage. |
Dependent item | nextcloud.user.quota.used[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Quota total space | The size of space available in the user's storage. |
Dependent item | nextcloud.user.quota.total[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Quota used space, in % | Usage of the allocated storage space, in percent. |
Dependent item | nextcloud.user.quota.pused[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Quota | The size of space available in the user's storage. |
Dependent item | nextcloud.user.quota[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Display name | User visible name. |
Dependent item | nextcloud.user.displayname[{#NEXTCLOUD.USER}] Preprocessing
|
User "{#NEXTCLOUD.USER}": Language | User language. |
Dependent item | nextcloud.user.language[{#NEXTCLOUD.USER}] Preprocessing
|
Trigger prototypes for Nextcloud: User discovery
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
User "{#NEXTCLOUD.USER}" status changed | User account status has changed. |
change(/Nextcloud by HTTP/nextcloud.user.enabled[{#NEXTCLOUD.USER}]) = 1 |
Info | |
User "{#NEXTCLOUD.USER}": inactive | The user has not logged in for more than {$NEXTCLOUD.USER.MAX.INACTIVE:"{#NEXTCLOUD.USER}"} days. |
last(/Nextcloud by HTTP/nextcloud.user.inactive[{#NEXTCLOUD.USER}]) > {$NEXTCLOUD.USER.MAX.INACTIVE:"{#NEXTCLOUD.USER}"} |
Info | |
User "{#NEXTCLOUD.USER}": High quota utilization | More than {$NEXTCLOUD.USER.QUOTA.PUSED.MAX:"{#NEXTCLOUD.USER}"} percent of the allocated storage space has been used. |
min(/Nextcloud by HTTP/nextcloud.user.quota.pused[{#NEXTCLOUD.USER}],5m) > {$NEXTCLOUD.USER.QUOTA.PUSED.MAX:"{#NEXTCLOUD.USER}"} |
Warning |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums