https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43137

--- Comment #14 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 202280
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202280&action=edit
Bug 43137: Add Koha::Health framework and SearchEngine check

Introduces the system health monitoring framework:

Koha::Health - Aggregator class that:
- Runs registered core health check classes
- Calls health_check plugin hook for plugin-contributed checks
- Caches the full response in Memcached (30s TTL)
- Provides fault isolation (each check wrapped in try/catch)
- Returns grouped response: { core => [...], plugins => {...} }

Koha::Health::SearchEngine - First core health check:
- Detects configured engine (Elasticsearch or Zebra)
- Elasticsearch: ping + cluster health (green/yellow/red)
- Zebra: daemon reachability via Zconn
- Reports warnings/critical messages with details

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ prove -v t/Koha/Health.t t/Koha/Health/SearchEngine.t
=> SUCCESS: All tests pass
3. Tests cover:
   - core_checks() registration
   - status() aggregation and caching behavior
   - Fault isolation for failing checks
   - ES green/yellow/red cluster statuses
   - ES connection failure
   - Zebra healthy and failed scenarios
4. Sign off :-D

Assisted-by: Sonnet 4 (Anthropic)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to