|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Manages alert inhibition rules. More...
#include <alert_pipeline.h>

Public Member Functions | |
| void | add_rule (const inhibition_rule &rule) |
| Add an inhibition rule. | |
| void | remove_rule (const std::string &name) |
| Remove an inhibition rule by name. | |
| bool | is_inhibited (const alert &target, const std::vector< alert > &active_alerts) const |
| Check if an alert is inhibited by any active alerts. | |
| std::vector< inhibition_rule > | get_rules () const |
| Get all rules. | |
Private Attributes | |
| std::mutex | mutex_ |
| std::vector< inhibition_rule > | rules_ |
Manages alert inhibition rules.
Alert inhibition prevents certain alerts from triggering when related, more important alerts are already firing.
Definition at line 330 of file alert_pipeline.h.
|
inline |
Add an inhibition rule.
Definition at line 335 of file alert_pipeline.h.
References mutex_, and rules_.
Referenced by main().

|
inline |
Get all rules.
Definition at line 386 of file alert_pipeline.h.
|
inline |
Check if an alert is inhibited by any active alerts.
| target | Alert to check |
| active_alerts | Currently firing alerts |
Definition at line 358 of file alert_pipeline.h.
References kcenon::monitoring::alert::fingerprint(), kcenon::monitoring::firing, mutex_, and rules_.
Referenced by main().


|
inline |
Remove an inhibition rule by name.
Definition at line 343 of file alert_pipeline.h.
|
mutableprivate |
Definition at line 392 of file alert_pipeline.h.
Referenced by add_rule(), get_rules(), is_inhibited(), and remove_rule().
|
private |
Definition at line 393 of file alert_pipeline.h.
Referenced by add_rule(), get_rules(), is_inhibited(), and remove_rule().