Lesender Selbsttest (Version, Services, Hosts, Downtimes) beim Start und täglich 04:00, Seite /selftest, Teilcheck checkmk_api in /health, Chat-Meldung bei Wechsel. Toleranter Antwort-Parser (value/members, state_type int/String), Fallbacks für Host-Abfrage und Downtime-Liste, Fehlerhinweise je HTTP-Status. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
553 B
Python
22 lines
553 B
Python
from ..constants import SELFTEST_ENABLED, SELFTEST_NOTIFY
|
|
from .sections import Field, Section
|
|
|
|
SLUG = "selftest"
|
|
|
|
|
|
def validate(values: dict) -> list[str]:
|
|
return []
|
|
|
|
|
|
SECTION = Section(
|
|
slug=SLUG,
|
|
title="Selbsttest",
|
|
fields=(
|
|
Field(SELFTEST_ENABLED, "Selbsttest aktiv (täglich 04:00 Uhr und beim Start)", kind="checkbox"),
|
|
Field(SELFTEST_NOTIFY, "Bei Fehlschlag, Abweichung, Rückkehr zu ok oder Versionswechsel in den Chat "
|
|
"melden", kind="checkbox"),
|
|
),
|
|
validate=validate,
|
|
optional=True,
|
|
)
|