|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|


Public Member Functions | |
| test_health_check (const std::string &name, health_check_type type, health_status status=health_status::healthy, const std::string &message="OK") | |
| std::string | get_name () const override |
| Get the human-readable name of this health check. | |
| health_check_type | get_type () const override |
| Get the type of this health check (liveness, readiness, or startup). | |
| health_check_result | check () override |
| Execute the health check and return the result. | |
| void | set_status (health_status status) |
| void | set_message (const std::string &msg) |
Public Member Functions inherited from kcenon::monitoring::health_check | |
| virtual | ~health_check ()=default |
| 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. | |
Private Attributes | |
| std::string | name_ |
| health_check_type | type_ |
| std::atomic< health_status > | status_ |
| std::string | message_ |
| std::mutex | mutex_ |
Definition at line 21 of file test_health_monitoring.cpp.
|
inline |
Definition at line 30 of file test_health_monitoring.cpp.
|
inlineoverridevirtual |
Execute the health check and return the result.
Implements kcenon::monitoring::health_check.
Definition at line 40 of file test_health_monitoring.cpp.
References kcenon::monitoring::health_check_result::check_duration, kcenon::monitoring::health_check_result::message, message_, mutex_, kcenon::monitoring::health_check_result::status, status_, and kcenon::monitoring::health_check_result::timestamp.
|
inlineoverridevirtual |
Get the human-readable name of this health check.
Implements kcenon::monitoring::health_check.
Definition at line 37 of file test_health_monitoring.cpp.
References name_.
|
inlineoverridevirtual |
Get the type of this health check (liveness, readiness, or startup).
Implements kcenon::monitoring::health_check.
Definition at line 38 of file test_health_monitoring.cpp.
References type_.
|
inline |
|
inline |
Definition at line 50 of file test_health_monitoring.cpp.
References status_.
|
private |
Definition at line 26 of file test_health_monitoring.cpp.
Referenced by check(), and set_message().
|
mutableprivate |
Definition at line 27 of file test_health_monitoring.cpp.
Referenced by check(), and set_message().
|
private |
Definition at line 23 of file test_health_monitoring.cpp.
Referenced by get_name().
|
private |
Definition at line 25 of file test_health_monitoring.cpp.
Referenced by check(), and set_status().
|
private |
Definition at line 24 of file test_health_monitoring.cpp.
Referenced by get_type().