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

Event fired when system state changes. More...

#include <observer_interface.h>

Collaboration diagram for kcenon::monitoring::state_change_event:
Collaboration graph

Public Types

enum class  state { healthy , degraded , critical , unknown }
 

Public Member Functions

 state_change_event (const std::string &component, state old_state, state new_state)
 
const std::string & component () const
 
state old_state () const
 
state new_state () const
 
std::chrono::steady_clock::time_point timestamp () const
 

Private Attributes

std::string component_
 
state old_state_
 
state new_state_
 
std::chrono::steady_clock::time_point timestamp_
 

Detailed Description

Event fired when system state changes.

Represents a transition from one health state to another for a specific component. Useful for tracking system health over time and triggering alerts on degradation.

Thread Safety:
This class is thread-safe for read operations. Once constructed, all accessors are const.

Definition at line 141 of file observer_interface.h.

Member Enumeration Documentation

◆ state

Constructor & Destructor Documentation

◆ state_change_event()

kcenon::monitoring::state_change_event::state_change_event ( const std::string & component,
state old_state,
state new_state )
inline

Member Function Documentation

◆ component()

const std::string & kcenon::monitoring::state_change_event::component ( ) const
inline

◆ new_state()

state kcenon::monitoring::state_change_event::new_state ( ) const
inline

◆ old_state()

state kcenon::monitoring::state_change_event::old_state ( ) const
inline

◆ timestamp()

std::chrono::steady_clock::time_point kcenon::monitoring::state_change_event::timestamp ( ) const
inline

Member Data Documentation

◆ component_

std::string kcenon::monitoring::state_change_event::component_
private

◆ new_state_

state kcenon::monitoring::state_change_event::new_state_
private

◆ old_state_

state kcenon::monitoring::state_change_event::old_state_
private

◆ timestamp_

std::chrono::steady_clock::time_point kcenon::monitoring::state_change_event::timestamp_
private

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