Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::interface_metric_source Class Referenceabstract

Interface for components that provide metrics. More...

#include <metric_collector_interface.h>

Collaboration diagram for kcenon::monitoring::interface_metric_source:
Collaboration graph

Public Member Functions

virtual ~interface_metric_source ()=default
 
virtual std::vector< metricget_current_metrics () const =0
 Get current metrics from this source.
 
virtual std::string get_source_name () const =0
 Get the name of this metric source.
 
virtual bool is_healthy () const =0
 Check if this source is healthy.
 

Detailed Description

Interface for components that provide metrics.

This interface defines the contract for components that can provide metrics to collectors. Metric sources are typically sensors, subsystems, or services that expose their internal state as metrics.

Thread Safety:
Implementations MUST be thread-safe. The get_current_metrics() method may be called from multiple threads simultaneously.

Definition at line 351 of file metric_collector_interface.h.

Constructor & Destructor Documentation

◆ ~interface_metric_source()

virtual kcenon::monitoring::interface_metric_source::~interface_metric_source ( )
virtualdefault

Member Function Documentation

◆ get_current_metrics()

virtual std::vector< metric > kcenon::monitoring::interface_metric_source::get_current_metrics ( ) const
pure virtual

Get current metrics from this source.

Returns
Vector of current metrics
Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/interfaces/metric_collector_interface.h.

◆ get_source_name()

virtual std::string kcenon::monitoring::interface_metric_source::get_source_name ( ) const
pure virtual

◆ is_healthy()

virtual bool kcenon::monitoring::interface_metric_source::is_healthy ( ) const
pure virtual

Check if this source is healthy.

Returns
True if healthy, false otherwise
Examples
/home/runner/work/monitoring_system/monitoring_system/include/kcenon/monitoring/interfaces/metric_collector_interface.h.

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