Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
AlertManagerProcessingTest Class Reference
Inheritance diagram for AlertManagerProcessingTest:
Inheritance graph
Collaboration diagram for AlertManagerProcessingTest:
Collaboration graph

Protected Member Functions

void SetUp () override
 

Protected Attributes

alert_manager manager_
 

Detailed Description

Definition at line 402 of file test_alert_manager.cpp.

Member Function Documentation

◆ SetUp()

void AlertManagerProcessingTest::SetUp ( )
inlineoverrideprotected

Definition at line 406 of file test_alert_manager.cpp.

406 {
407 auto rule = std::make_shared<alert_rule>("cpu_high");
408 rule->set_metric_name("cpu_usage")
409 .set_severity(alert_severity::critical)
410 .set_trigger(threshold_trigger::above(80.0))
411 .set_for_duration(0ms); // Immediate transition (no pending wait)
412 manager_.add_rule(rule);
413 }
common::VoidResult add_rule(std::shared_ptr< alert_rule > rule)
Add an alert rule.
static std::shared_ptr< threshold_trigger > above(double threshold)
Create trigger for value > threshold.

References kcenon::monitoring::threshold_trigger::above(), kcenon::monitoring::alert_manager::add_rule(), and manager_.

Here is the call graph for this function:

Member Data Documentation

◆ manager_

alert_manager AlertManagerProcessingTest::manager_
protected

Definition at line 404 of file test_alert_manager.cpp.

Referenced by SetUp().


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