#include <system_resource_collector.h>
Resource threshold monitor Monitors system resources against configured thresholds
Definition at line 411 of file system_resource_collector.h.
◆ resource_threshold_monitor()
| kcenon::monitoring::resource_threshold_monitor::resource_threshold_monitor |
( |
const thresholds & | config | ) |
|
|
explicit |
◆ add_alert()
| void kcenon::monitoring::resource_threshold_monitor::add_alert |
( |
std::vector< alert > & | alerts, |
|
|
const std::string & | resource, |
|
|
alert::severity | level, |
|
|
double | value, |
|
|
double | threshold, |
|
|
const std::string & | message ) |
|
private |
◆ check_cpu_usage()
| void kcenon::monitoring::resource_threshold_monitor::check_cpu_usage |
( |
std::vector< alert > & | alerts, |
|
|
const system_resources & | resources ) |
|
private |
◆ check_disk_usage()
| void kcenon::monitoring::resource_threshold_monitor::check_disk_usage |
( |
std::vector< alert > & | alerts, |
|
|
const system_resources & | resources ) |
|
private |
◆ check_memory_usage()
| void kcenon::monitoring::resource_threshold_monitor::check_memory_usage |
( |
std::vector< alert > & | alerts, |
|
|
const system_resources & | resources ) |
|
private |
◆ check_swap_usage()
| void kcenon::monitoring::resource_threshold_monitor::check_swap_usage |
( |
std::vector< alert > & | alerts, |
|
|
const system_resources & | resources ) |
|
private |
◆ check_thresholds()
| std::vector< alert > kcenon::monitoring::resource_threshold_monitor::check_thresholds |
( |
const system_resources & | resources | ) |
|
Check resources against thresholds
- Parameters
-
| resources | System resources to check |
- Returns
- Vector of triggered alerts
◆ clear_history()
| void kcenon::monitoring::resource_threshold_monitor::clear_history |
( |
| ) |
|
◆ get_alert_history()
| std::vector< alert > kcenon::monitoring::resource_threshold_monitor::get_alert_history |
( |
size_t | max_count = 100 | ) |
const |
Get alert history
- Parameters
-
| max_count | Maximum number of alerts to return |
- Returns
- Vector of recent alerts
◆ get_thresholds()
| thresholds kcenon::monitoring::resource_threshold_monitor::get_thresholds |
( |
| ) |
const |
Get current threshold configuration
- Returns
- Current thresholds
◆ update_thresholds()
| void kcenon::monitoring::resource_threshold_monitor::update_thresholds |
( |
const thresholds & | config | ) |
|
Update threshold configuration
- Parameters
-
| config | New threshold values |
◆ alert_history_
| std::vector<alert> kcenon::monitoring::resource_threshold_monitor::alert_history_ |
|
private |
◆ config_
| thresholds kcenon::monitoring::resource_threshold_monitor::config_ |
|
private |
◆ config_mutex_
| std::mutex kcenon::monitoring::resource_threshold_monitor::config_mutex_ |
|
mutableprivate |
◆ history_mutex_
| std::mutex kcenon::monitoring::resource_threshold_monitor::history_mutex_ |
|
mutableprivate |
◆ max_history_size_
| const size_t kcenon::monitoring::resource_threshold_monitor::max_history_size_ {1000} |
|
private |
The documentation for this class was generated from the following file: