|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Abstract base class for health checks. More...
#include <health_monitor.h>


Public Member Functions | |
| virtual | ~health_check ()=default |
| virtual std::string | get_name () const =0 |
| Get the human-readable name of this health check. | |
| virtual health_check_type | get_type () const =0 |
| Get the type of this health check (liveness, readiness, or startup). | |
| virtual health_check_result | check ()=0 |
| Execute the health check and return the result. | |
| virtual std::chrono::milliseconds | get_timeout () const |
| Get the maximum time allowed for this check to complete. | |
| virtual bool | is_critical () const |
| Whether this check is critical for overall system health. | |
Abstract base class for health checks.
Subclass this to implement custom health checks. Override check() to perform the actual health verification, and optionally override get_timeout() and is_critical() to customize behavior.
Definition at line 110 of file health_monitor.h.
|
virtualdefault |
|
pure virtual |
Execute the health check and return the result.
Implemented in database_health_check, external_api_health_check, kcenon::monitoring::composite_health_check, kcenon::monitoring::functional_health_check, and test_health_check.
|
pure virtual |
Get the human-readable name of this health check.
Implemented in database_health_check, external_api_health_check, kcenon::monitoring::composite_health_check, kcenon::monitoring::functional_health_check, and test_health_check.
|
inlinevirtual |
Get the maximum time allowed for this check to complete.
Reimplemented in kcenon::monitoring::functional_health_check.
Definition at line 136 of file health_monitor.h.
|
pure virtual |
Get the type of this health check (liveness, readiness, or startup).
Implemented in database_health_check, external_api_health_check, kcenon::monitoring::composite_health_check, kcenon::monitoring::functional_health_check, and test_health_check.
|
inlinevirtual |
Whether this check is critical for overall system health.
Reimplemented in database_health_check, external_api_health_check, and kcenon::monitoring::functional_health_check.
Definition at line 144 of file health_monitor.h.