feat(iwooos): gate Wazuh dashboard API readiness
Some checks failed
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Successful in 1m44s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Ansible / Reboot Recovery Contract / validate (push) Has been cancelled

This commit is contained in:
ogt
2026-06-25 18:04:58 +08:00
parent 6accbb0b30
commit 6ca53fafc9
6 changed files with 93 additions and 5 deletions

View File

@@ -153,6 +153,48 @@ def validate(root: Path) -> None:
"wazuh_agent_visibility_runtime_gate.dashboard_api_degraded_observed",
snapshot.get("dashboard_api_degraded_observed"),
)
assert_true(
"wazuh_agent_visibility_runtime_gate.dashboard_startup_check_observed",
snapshot.get("dashboard_startup_check_observed"),
)
assert_equal(
"wazuh_agent_visibility_runtime_gate.dashboard_api_connection_check_status",
snapshot.get("dashboard_api_connection_check_status"),
"pending_or_spinning",
)
assert_equal(
"wazuh_agent_visibility_runtime_gate.dashboard_api_version_check_status",
snapshot.get("dashboard_api_version_check_status"),
"not_verified",
)
assert_equal(
"wazuh_agent_visibility_runtime_gate.dashboard_alerts_index_pattern_check_status",
snapshot.get("dashboard_alerts_index_pattern_check_status"),
"ok",
)
assert_equal(
"wazuh_agent_visibility_runtime_gate.dashboard_monitoring_index_pattern_check_status",
snapshot.get("dashboard_monitoring_index_pattern_check_status"),
"ok",
)
assert_equal(
"wazuh_agent_visibility_runtime_gate.dashboard_statistics_index_pattern_check_status",
snapshot.get("dashboard_statistics_index_pattern_check_status"),
"ok",
)
assert_equal(
"wazuh_agent_visibility_runtime_gate.dashboard_index_pattern_ok_count",
snapshot.get("dashboard_index_pattern_ok_count"),
3,
)
assert_zero(
"wazuh_agent_visibility_runtime_gate.dashboard_api_connection_ok_count",
snapshot.get("dashboard_api_connection_ok_count"),
)
assert_zero(
"wazuh_agent_visibility_runtime_gate.dashboard_api_version_ok_count",
snapshot.get("dashboard_api_version_ok_count"),
)
for key in [
"dashboard_stored_api_unreachable_observed",
"dashboard_api_login_500_observed",
@@ -193,6 +235,8 @@ def main() -> None:
f"registry=0 route={snapshot['production_route_http_status']} "
f"transport={snapshot['manager_transport_established_connection_count']} "
f"dashboard_degraded={int(snapshot['dashboard_api_degraded_observed'])} "
f"api_connection={snapshot['dashboard_api_connection_check_status']} "
f"index_ok={snapshot['dashboard_index_pattern_ok_count']} "
f"runtime_gate={snapshot['runtime_gate_count']}"
)