Fixed some misleading information strings

This commit is contained in:
Ralf Mellis 2023-08-16 12:12:13 +02:00
parent 57863531fc
commit 82333a2ebc
10 changed files with 13 additions and 10 deletions

View File

@ -1,11 +1,15 @@
# Nextcloud CheckMK Special Agent
Monitors various aspects of Nextcloud instances like state, quota and disk usage of all users, number of apps with available updates, database cache hit rate and so on.
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, number of storages and active users etc.
Tested with Nextcloud 25/26/27.
Tested only with MySQL/MariaDB as database backend.
Feel free to report other working environments.
Version History:
--
|Date|Version|Changes|
|----|-------|-------|
|2023/08/16|2.3.3|Fixed some misleading info strings regarding database opcache|
|2023/08/12|2.3.2|MKP now compatible with CheckMK 2.2|
|2023/03/27|2.3.1|Fixed bugs in parameter handling|
|2023/03/23|2.2.1|Adjusted parameter handling|

View File

@ -34,7 +34,7 @@ def check_nextcloud_database(params, section):
# create graph for database size
yield Metric("nc_database_size", size)
state = getStateLower(levels, opcache_hit_rate)
summary = f"Cache hit rate: {render.percent(opcache_hit_rate)}"
summary = f"PHP OPCache hit rate: {render.percent(opcache_hit_rate)}"
details = f"\nDatabase type: {type}\nDatabase version: {version}\nDatabase size: {render.bytes(size)}"
yield(Result(state=state, summary=summary, details=details))

View File

@ -4,13 +4,13 @@ catalog: unsorted
license: GPL
distribution: check_mk
description:
Works with Nextcloud version 25.0.3 (use at your own risk with lower versions).
Works with Nextcloud version 25/26/27 (use at your own risk with lower versions).
Tested only with mysql/mariab as underlying database.
You may use a username/password or username/token combination to get access to the Nextcloud API.
You can create this token within the personal settings of an administrative user in Nextcloud.
Got to security settings and create a new app password, use this for the token.
The user must not be secured with 2FA.
Shows several information about a Nextcloud database (type/version/size).
The check will raise WARN/CRIT if Database OP cache hit rate is below the configurable levels.
The check will raise WARN/CRIT if Database PHP OPcache hit rate is below the configurable levels.
inventory:
one service is created (with several details)

View File

@ -4,7 +4,7 @@ catalog: unsorted
license: GPL
distribution: check_mk
description:
Works with Nextcloud version 25.0.3 (use at your own risk with lower versions).
Works with Nextcloud version 25/26/27 (use at your own risk with lower versions).
Tested only with mysql/mariab as underlying database.
You may use a username/password or username/token combination to get access to the Nextcloud API.
You can create this token within the personal settings of an administrative user in Nextcloud.

View File

@ -4,7 +4,7 @@ catalog: unsorted
license: GPL
distribution: check_mk
description:
Works with Nextcloud version 25.0.3 (use at your own risk with lower versions).
Works with Nextcloud version 25/26/27 (use at your own risk with lower versions).
You may use a username/password or username/token combination to get access to the Nextcloud API.
You can create this token within the personal settings of an administrative user in Nextcloud.
Got to security settings and create a new app password, use this for the token.

View File

@ -96,7 +96,7 @@ metric_info["nc_database_size"] = {
}
metric_info["nc_database_opcache_hit_rate"] = {
"title": _("Database OP Cache Hit Rate"),
"title": _("Database PHP OPCache Hit Rate"),
"unit": "%",
"color": "24/a",
}

View File

@ -17,7 +17,7 @@ def _parameter_spec_nextcloud_database():
return Dictionary(
elements=[
("levels_database_opcache_hit_rate", Tuple(
title=_("Nextcloud levels for database opcache hit rate"),
title=_("Nextcloud levels for database php opcache hit rate"),
elements=[
Percentage(
title=_("Warning below"),

View File

@ -18,7 +18,6 @@ from cmk.gui.plugins.wato import (
)
from cmk.gui.plugins.wato.datasource_programs import RulespecGroupDatasourceProgramsCustom
#import cmk.gui.watolib as watolib
def _valuespec_special_agent_nextcloud():
return Dictionary(
@ -53,7 +52,6 @@ def _valuespec_special_agent_nextcloud():
rulespec_registry.register(
HostRulespec(
#factory_default=watolib.Rulespec.FACTORY_DEFAULT_UNUSED,
group=RulespecGroupDatasourceProgramsCustom,
name="special_agents:nextcloud",
valuespec=_valuespec_special_agent_nextcloud,

View File

@ -11,6 +11,7 @@ from cmk.gui.valuespec import (
Tuple,
Percentage,
Integer,
TextAscii,
Float,
)

BIN
mkp/Nextcloud-2.3.3.mkp Executable file

Binary file not shown.