CHAT_OUTPUT_BEGIN
COMMAND_ID=HOMELAB-SKLADCHIK-COOKIE-SAFE-CONTRACT-AUDIT-384
STATUS=OK
RC=0
HOST=pve01
MODE=read-only
COMPONENT=cluster-audit
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752
COMMAND_SHA256=a7320ed2ae1becc8871f7fe2d84c11a3fa8380eab4f383fa906a10bbb9049da7
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGES_MADE=false
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=119a7528288c446ea5d3ce64bb0e3a3132688450cc725ca8e1bcdb26dce0e4ce
SANITIZED_OUTPUT_SHA256=119a7528288c446ea5d3ce64bb0e3a3132688450cc725ca8e1bcdb26dce0e4ce
OUTPUT_BEGIN
DETAIL=READER_TRANSPORT_COMPONENTS=PASS
DETAIL=PENDING_COOKIE_META=0:0|600|752|regular file
DETAIL=PENDING_COOKIE_SHA256=3c260f0622999b94e1c3b45d5042532fe001b8118dff0d326636b2ad8609d8c4
DETAIL=PENDING_COOKIE_CAPTURE_FORMAT=RAW_COOKIE_VALUE
DETAIL=PENDING_COOKIE_PAIR_COUNT=5
DETAIL=PENDING_COOKIE_DUPLICATE_NAME_COUNT=0
DETAIL=PENDING_COOKIE_UTF8_BOM=NO
DETAIL=PENDING_COOKIE_CRLF=NO
DETAIL=PENDING_COOKIE_TRAILING_NEWLINE=NO
DETAIL=PENDING_COOKIE_SECRET_OUTPUT=NONE
DETAIL=SERVICE_LOADSTATE=loaded
DETAIL=SERVICE_ACTIVESTATE=failed
DETAIL=SERVICE_SUBSTATE=failed
DETAIL=SERVICE_RESULT=exit-code
DETAIL=SERVICE_EXECMAINSTATUS=1
DETAIL=SERVICE_FRAGMENTPATH=/etc/systemd/system/skladchik-reports-monitor-supervisor.service
DETAIL=SERVICE_USER=
DETAIL=SERVICE_GROUP=
DETAIL=SERVICE_WORKINGDIRECTORY=
DETAIL=SERVICE_RESTART=no
DETAIL=SERVICE_RESTARTUSEC=100ms
DETAIL=RUNTIME_SOURCE=/usr/local/sbin/skladchik-reports-monitor-status|ROLE=STATUS_SCRIPT|META=0:0|755|3427|regular file|SHA256=f902a61109efbac5918360f2235c2523bd10704ac484a4e8591e8a1c490faf5a
DETAIL=SOURCE_LINE=STATUS_SCRIPT|82|echo "SHELL_SESSION_PRESERVED=yes"
DETAIL=RUNTIME_SOURCE=/usr/local/sbin/skladchik-reports-monitor-supervisor|ROLE=SUPERVISOR|META=0:0|755|20463|regular file|SHA256=35c68ae0929ff3795be2bde40de334fc8e26413a3d8a620a137be90d1f2c164e
DETAIL=SOURCE_LINE=SUPERVISOR|22|COOKIE_EXPIRY_WARN_SECONDS = int(os.environ.get("SKLADCHIK_COOKIE_EXPIRY_WARN_SECONDS", "604800"))
DETAIL=SOURCE_LINE=SUPERVISOR|127|test -s /var/lib/skladchik-reports-monitor/cookies.jar && echo cookies_jar=yes || echo cookies_jar=no
DETAIL=SOURCE_LINE=SUPERVISOR|128|[ -s /var/lib/skladchik-reports-monitor/cookies.jar ] && echo cookies_jar_bytes=$(stat -c %s /var/lib/skladchik-reports-monitor/cookies.jar 2>/dev/null) || echo cookies_jar_bytes=0
DETAIL=SOURCE_LINE=SUPERVISOR|153|    facts["session_keepalive"] = mon.get("session_keepalive", "")
DETAIL=SOURCE_LINE=SUPERVISOR|154|    facts["cookie_jar"] = mon.get("cookie_jar", "")
DETAIL=SOURCE_LINE=SUPERVISOR|155|    facts["cookie_jar_bytes"] = mon.get("cookie_jar_bytes", "")
DETAIL=SOURCE_LINE=SUPERVISOR|156|    facts["cookie_expiry_status"] = mon.get("cookie_expiry_status", "")
DETAIL=SOURCE_LINE=SUPERVISOR|157|    facts["cookie_expiry_utc"] = mon.get("cookie_expiry_utc", "")
DETAIL=SOURCE_LINE=SUPERVISOR|158|    facts["cookie_expires_in_seconds"] = mon.get("cookie_expires_in_seconds", "")
DETAIL=SOURCE_LINE=SUPERVISOR|159|    facts["cookie_expires_in_days"] = mon.get("cookie_expires_in_days", "")
DETAIL=SOURCE_LINE=SUPERVISOR|160|    facts["cookie_persistent_count"] = mon.get("cookie_persistent_count", "")
DETAIL=SOURCE_LINE=SUPERVISOR|168|    if mon.get("session_keepalive") != "persistent_cookie_jar":
DETAIL=SOURCE_LINE=SUPERVISOR|169|        problems.append("session_keepalive_not_persistent")
DETAIL=SOURCE_LINE=SUPERVISOR|170|    if mon.get("cookie_jar") not in ("yes", "empty"):
DETAIL=SOURCE_LINE=SUPERVISOR|171|        problems.append("monitor_cookie_jar_bad")
DETAIL=SOURCE_LINE=SUPERVISOR|172|    expiry_status = mon.get("cookie_expiry_status", "")
DETAIL=SOURCE_LINE=SUPERVISOR|174|        expires_in = int(mon.get("cookie_expires_in_seconds", ""))
DETAIL=SOURCE_LINE=SUPERVISOR|177|    if expiry_status in ("", "NO_COOKIE_JAR", "NO_PERSISTENT_COOKIE", "ERROR"):
DETAIL=SOURCE_LINE=SUPERVISOR|178|        problems.append("cookie_expiry_missing")
DETAIL=SOURCE_LINE=SUPERVISOR|180|        problems.append("cookie_expiry_expired")
DETAIL=SOURCE_LINE=SUPERVISOR|181|    elif expiry_status == "WARN" or (expires_in is not None and expires_in < COOKIE_EXPIRY_WARN_SECONDS):
DETAIL=SOURCE_LINE=SUPERVISOR|182|        problems.append("cookie_expiry_warn")
DETAIL=SOURCE_LINE=SUPERVISOR|202|    for k in ["monitor_py", "config_ini", "secrets_env", "cookies_jar", "operational_digest_py", "event_selftest_runner_py", "event_selftest_core", "weekly_summary_health", "age_alert_health", "event_selftest_health", "py_compile"]:
DETAIL=SOURCE_LINE=SUPERVISOR|206|    facts["cookies_jar_bytes_file"] = files.get("cookies_jar_bytes", "0")
DETAIL=COOKIE_TARGET_CANDIDATE=/var/lib/skladchik-reports-monitor/cookies.jar|STATE=ABSENT
DETAIL=JOURNAL_MARKER_AUTH_COUNT=20
DETAIL=JOURNAL_MARKER_COOKIE_COUNT=0
DETAIL=JOURNAL_MARKER_LOGIN_COUNT=0
DETAIL=JOURNAL_MARKER_HTTP_401_COUNT=0
DETAIL=JOURNAL_MARKER_HTTP_403_COUNT=0
DETAIL=JOURNAL_MARKER_CAPTCHA_COUNT=0
DETAIL=JOURNAL_MARKER_FAILED_COUNT=40
DETAIL=JOURNAL_MARKER_ERROR_COUNT=0
DETAIL=COOKIE_FORMAT_MARKERS=NONE
DETAIL=SKLADCHIK_COOKIE_SAFE_CONTRACT_AUDIT=PASS
CHANGES_MADE=NO

OUTPUT_END
CHAT_OUTPUT_END
