|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Hardware monitoring plugin aggregating battery, power, temperature, and GPU collectors. More...
#include <hardware_plugin.h>


Public Member Functions | |
| ~hardware_plugin () override | |
| hardware_plugin (const hardware_plugin &)=delete | |
| hardware_plugin & | operator= (const hardware_plugin &)=delete |
| bool | initialize (const std::unordered_map< std::string, std::string > &config) override |
| std::vector< metric > | collect () override |
| std::string | get_name () const override |
| std::vector< std::string > | get_metric_types () const override |
| bool | is_healthy () const override |
| std::unordered_map< std::string, double > | get_statistics () const override |
| bool | is_battery_available () const |
| bool | is_power_available () const |
| bool | is_temperature_available () const |
| bool | is_gpu_available () const |
| hardware_plugin_config | get_config () const |
Public Member Functions inherited from kcenon::monitoring::metric_collector_plugin | |
| virtual | ~metric_collector_plugin ()=default |
Static Public Member Functions | |
| static std::unique_ptr< hardware_plugin > | create (const hardware_plugin_config &config={}) |
Private Member Functions | |
| hardware_plugin (const hardware_plugin_config &config) | |
| void | initialize_collectors () |
Private Attributes | |
| std::unique_ptr< battery_collector > | battery_collector_ |
| std::unique_ptr< power_collector > | power_collector_ |
| std::unique_ptr< temperature_collector > | temperature_collector_ |
| std::unique_ptr< gpu_collector > | gpu_collector_ |
| hardware_plugin_config | config_ |
| bool | initialized_ {false} |
| std::mutex | stats_mutex_ |
| std::atomic< size_t > | total_collections_ {0} |
| std::atomic< size_t > | collection_errors_ {0} |
Hardware monitoring plugin aggregating battery, power, temperature, and GPU collectors.
This plugin provides hardware-specific metrics collection for desktop/laptop environments. For server deployments, this plugin should not be loaded to reduce binary size and avoid unnecessary collection overhead.
Metrics provided:
Definition at line 106 of file hardware_plugin.h.
|
override |
|
delete |
|
explicitprivate |
|
overridevirtual |
Collect metrics from the data source
Implements kcenon::monitoring::metric_collector_plugin.
|
static |
Create a hardware plugin instance with configuration
| config | Plugin configuration options |
| hardware_plugin_config kcenon::monitoring::plugins::hardware_plugin::get_config | ( | ) | const |
Get the current configuration
|
overridevirtual |
Get supported metric types
Implements kcenon::monitoring::metric_collector_plugin.
|
overridevirtual |
Get the name of this plugin
Implements kcenon::monitoring::metric_collector_plugin.
|
overridevirtual |
Get plugin-specific statistics
Implements kcenon::monitoring::metric_collector_plugin.
|
overridevirtual |
Initialize the plugin with configuration
| config | Plugin-specific configuration |
Implements kcenon::monitoring::metric_collector_plugin.
|
private |
| bool kcenon::monitoring::plugins::hardware_plugin::is_battery_available | ( | ) | const |
Check if battery monitoring is available
| bool kcenon::monitoring::plugins::hardware_plugin::is_gpu_available | ( | ) | const |
Check if GPU monitoring is available
|
overridevirtual |
Check if the plugin is healthy
Implements kcenon::monitoring::metric_collector_plugin.
| bool kcenon::monitoring::plugins::hardware_plugin::is_power_available | ( | ) | const |
Check if power monitoring is available
| bool kcenon::monitoring::plugins::hardware_plugin::is_temperature_available | ( | ) | const |
Check if temperature monitoring is available
|
delete |
|
private |
Definition at line 163 of file hardware_plugin.h.
|
private |
Definition at line 175 of file hardware_plugin.h.
|
private |
Definition at line 169 of file hardware_plugin.h.
|
private |
Definition at line 166 of file hardware_plugin.h.
|
private |
Definition at line 170 of file hardware_plugin.h.
|
private |
Definition at line 164 of file hardware_plugin.h.
|
mutableprivate |
Definition at line 173 of file hardware_plugin.h.
|
private |
Definition at line 165 of file hardware_plugin.h.
|
private |
Definition at line 174 of file hardware_plugin.h.