1st auto commit with script
This commit is contained in:
@@ -4,9 +4,6 @@
|
|||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from typing import NotRequired, TypedDict
|
from typing import NotRequired, TypedDict
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
from cmk.utils import debug
|
|
||||||
|
|
||||||
from cmk.agent_based.v2 import (
|
from cmk.agent_based.v2 import (
|
||||||
AgentSection,
|
AgentSection,
|
||||||
@@ -46,8 +43,6 @@ def discover_nextcloud_database(section) -> DiscoveryResult:
|
|||||||
|
|
||||||
|
|
||||||
def check_nextcloud_database(params, section) -> CheckResult:
|
def check_nextcloud_database(params, section) -> CheckResult:
|
||||||
if debug.enabled():
|
|
||||||
pprint(section)
|
|
||||||
for key in section:
|
for key in section:
|
||||||
if key == "database":
|
if key == "database":
|
||||||
opcache_hit_rate = section[key]["opcache_hit_rate"]
|
opcache_hit_rate = section[key]["opcache_hit_rate"]
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
# pylint: disable=line-too-long, too-many-branches, too-many-locals, too-many-statements
|
# pylint: disable=line-too-long, too-many-branches, too-many-locals, too-many-statements
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
from cmk.utils import debug
|
|
||||||
from cmk.agent_based.v2 import (
|
from cmk.agent_based.v2 import (
|
||||||
AgentSection,
|
AgentSection,
|
||||||
CheckPlugin,
|
CheckPlugin,
|
||||||
@@ -44,8 +42,6 @@ def discover_nextcloud_info(section) -> DiscoveryResult:
|
|||||||
|
|
||||||
def check_nextcloud_info(params, section) -> CheckResult:
|
def check_nextcloud_info(params, section) -> CheckResult:
|
||||||
for key in section:
|
for key in section:
|
||||||
if debug.enabled():
|
|
||||||
pprint(section)
|
|
||||||
if key == "nextcloud":
|
if key == "nextcloud":
|
||||||
_level_type, levels_free_space = params["levels_free_space"]
|
_level_type, levels_free_space = params["levels_free_space"]
|
||||||
_level_type, levels_number_of_files = params["levels_number_of_files"]
|
_level_type, levels_number_of_files = params["levels_number_of_files"]
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
# pylint: disable=line-too-long, too-many-locals
|
# pylint: disable=line-too-long, too-many-locals
|
||||||
|
|
||||||
from time import time
|
from time import time
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
from cmk.utils import debug
|
|
||||||
|
|
||||||
from cmk.agent_based.v2 import (
|
from cmk.agent_based.v2 import (
|
||||||
AgentSection,
|
AgentSection,
|
||||||
@@ -45,8 +42,6 @@ def discover_nextcloud_users(section) -> DiscoveryResult:
|
|||||||
|
|
||||||
|
|
||||||
def check_nextcloud_users(item, params, section) -> CheckResult:
|
def check_nextcloud_users(item, params, section) -> CheckResult:
|
||||||
if debug.enabled():
|
|
||||||
pprint(section)
|
|
||||||
userid = item
|
userid = item
|
||||||
quota_used_percent = section[item][0]
|
quota_used_percent = section[item][0]
|
||||||
quota_used_bytes = section[item][1]
|
quota_used_bytes = section[item][1]
|
||||||
|
|||||||
Reference in New Issue
Block a user