Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::health_monitor_config Struct Reference

Configuration for the health_monitor. More...

#include <health_monitor.h>

Collaboration diagram for kcenon::monitoring::health_monitor_config:
Collaboration graph

Public Attributes

std::chrono::milliseconds check_interval {std::chrono::milliseconds(5000)}
 Interval between automatic health check cycles.
 
std::chrono::seconds cache_duration {std::chrono::seconds(1)}
 Duration to cache health check results.
 
bool enable_auto_recovery {true}
 Whether to invoke recovery handlers on failure.
 
size_t max_consecutive_failures {3}
 Failures before triggering recovery.
 
std::chrono::seconds recovery_timeout {std::chrono::seconds(30)}
 Maximum time allowed for a recovery attempt.
 

Detailed Description

Configuration for the health_monitor.

Examples
health_reliability_example.cpp, and production_monitoring_example.cpp.

Definition at line 78 of file health_monitor.h.

Member Data Documentation

◆ cache_duration

std::chrono::seconds kcenon::monitoring::health_monitor_config::cache_duration {std::chrono::seconds(1)}

Duration to cache health check results.

Examples
health_reliability_example.cpp.

Definition at line 80 of file health_monitor.h.

80{std::chrono::seconds(1)};

Referenced by demonstrate_health_monitoring().

◆ check_interval

std::chrono::milliseconds kcenon::monitoring::health_monitor_config::check_interval {std::chrono::milliseconds(5000)}

Interval between automatic health check cycles.

Examples
health_reliability_example.cpp, and production_monitoring_example.cpp.

Definition at line 79 of file health_monitor.h.

79{std::chrono::milliseconds(5000)};

Referenced by demonstrate_health_monitoring(), main(), kcenon::monitoring::health_monitor::run_monitoring_loop(), and TEST_F().

◆ enable_auto_recovery

bool kcenon::monitoring::health_monitor_config::enable_auto_recovery {true}

Whether to invoke recovery handlers on failure.

Examples
production_monitoring_example.cpp.

Definition at line 81 of file health_monitor.h.

81{true};

Referenced by main(), kcenon::monitoring::health_monitor::refresh(), and TEST_F().

◆ max_consecutive_failures

size_t kcenon::monitoring::health_monitor_config::max_consecutive_failures {3}

Failures before triggering recovery.

Definition at line 82 of file health_monitor.h.

82{3};

◆ recovery_timeout

std::chrono::seconds kcenon::monitoring::health_monitor_config::recovery_timeout {std::chrono::seconds(30)}

Maximum time allowed for a recovery attempt.

Definition at line 83 of file health_monitor.h.

83{std::chrono::seconds(30)};

The documentation for this struct was generated from the following file: