|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Group of related alerts for batch notification. More...
#include <alert_types.h>

Public Member Functions | |
| alert_group () | |
| alert_group (std::string key) | |
| void | add_alert (alert a) |
| Add an alert to the group. | |
| size_t | size () const |
| Get count of alerts in the group. | |
| bool | empty () const |
| Check if group is empty. | |
| alert_severity | max_severity () const |
| Get highest severity in the group. | |
Public Attributes | |
| std::string | group_key |
| Common grouping key. | |
| std::vector< alert > | alerts |
| Alerts in this group. | |
| std::chrono::steady_clock::time_point | created_at |
| Group creation time. | |
| std::chrono::steady_clock::time_point | updated_at |
| Last modification time. | |
| alert_labels | common_labels |
| Labels shared by all alerts. | |
Group of related alerts for batch notification.
Alerts with the same group key are combined into an alert group to reduce notification noise.
Definition at line 322 of file alert_types.h.
|
inline |
Definition at line 329 of file alert_types.h.
|
inlineexplicit |
Definition at line 333 of file alert_types.h.
|
inline |
Add an alert to the group.
| a | Alert to add |
Definition at line 342 of file alert_types.h.
References alerts, and updated_at.
Referenced by kcenon::monitoring::alert_aggregator::add_alert(), kcenon::monitoring::buffered_notifier::flush_internal(), and main().

|
inline |
Check if group is empty.
Definition at line 359 of file alert_types.h.
References alerts.
Referenced by TEST_F().

|
inline |
Get highest severity in the group.
Definition at line 367 of file alert_types.h.
References alerts, and kcenon::monitoring::info.
Referenced by kcenon::monitoring::json_alert_formatter::format_group(), kcenon::monitoring::text_alert_formatter::format_group(), and main().

|
inline |
Get count of alerts in the group.
Definition at line 351 of file alert_types.h.
References alerts.
Referenced by kcenon::monitoring::json_alert_formatter::format_group(), kcenon::monitoring::text_alert_formatter::format_group(), main(), kcenon::monitoring::console_color_notifier::notify_group(), and TEST_F().

| std::vector<alert> kcenon::monitoring::alert_group::alerts |
Alerts in this group.
Definition at line 324 of file alert_types.h.
Referenced by add_alert(), empty(), kcenon::monitoring::json_alert_formatter::format_group(), kcenon::monitoring::text_alert_formatter::format_group(), max_severity(), kcenon::monitoring::buffered_notifier::notify_group(), kcenon::monitoring::callback_notifier::notify_group(), kcenon::monitoring::console_color_notifier::notify_group(), kcenon::monitoring::routing_notifier::notify_group(), kcenon::monitoring::statistics_notifier::notify_group(), and size().
| alert_labels kcenon::monitoring::alert_group::common_labels |
Labels shared by all alerts.
Definition at line 327 of file alert_types.h.
Referenced by kcenon::monitoring::alert_aggregator::add_alert(), and main().
| std::chrono::steady_clock::time_point kcenon::monitoring::alert_group::created_at |
Group creation time.
Definition at line 325 of file alert_types.h.
| std::string kcenon::monitoring::alert_group::group_key |
Common grouping key.
Definition at line 323 of file alert_types.h.
Referenced by kcenon::monitoring::json_alert_formatter::format_group(), kcenon::monitoring::text_alert_formatter::format_group(), main(), kcenon::monitoring::console_color_notifier::notify_group(), and TEST_F().
| std::chrono::steady_clock::time_point kcenon::monitoring::alert_group::updated_at |