|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|


Public Member Functions | |
| statistics_notifier (std::string notifier_name) | |
| std::string | name () const override |
| Get notifier name. | |
| common::VoidResult | notify (const alert &a) override |
| Send a notification for an alert. | |
| common::VoidResult | notify_group (const alert_group &group) override |
| Send a notification for an alert group. | |
| bool | is_ready () const override |
| Check if notifier is ready. | |
| void | print_statistics () const |
| void | reset () |
Public Member Functions inherited from kcenon::monitoring::alert_notifier | |
| virtual | ~alert_notifier ()=default |
Private Attributes | |
| std::string | name_ |
| std::mutex | mutex_ |
| size_t | total_alerts_ = 0 |
| std::map< alert_severity, size_t > | severity_counts_ |
| std::map< alert_state, size_t > | state_counts_ |
Definition at line 110 of file alert_notifiers_example.cpp.
|
inlineexplicit |
Definition at line 112 of file alert_notifiers_example.cpp.
|
inlineoverridevirtual |
Check if notifier is ready.
Implements kcenon::monitoring::alert_notifier.
Definition at line 135 of file alert_notifiers_example.cpp.
|
inlineoverridevirtual |
Get notifier name.
Implements kcenon::monitoring::alert_notifier.
Definition at line 115 of file alert_notifiers_example.cpp.
References name_.
|
inlineoverridevirtual |
Send a notification for an alert.
| a | Alert to notify about |
Implements kcenon::monitoring::alert_notifier.
Definition at line 117 of file alert_notifiers_example.cpp.
References mutex_, kcenon::monitoring::alert::severity, severity_counts_, kcenon::monitoring::alert::state, state_counts_, and total_alerts_.
Referenced by notify_group().

|
inlineoverridevirtual |
Send a notification for an alert group.
| group | Alert group to notify about |
Implements kcenon::monitoring::alert_notifier.
Definition at line 125 of file alert_notifiers_example.cpp.
References kcenon::monitoring::alert_group::alerts, and notify().

|
inline |
Definition at line 137 of file alert_notifiers_example.cpp.
References kcenon::monitoring::alert_severity_to_string(), kcenon::monitoring::alert_state_to_string(), mutex_, name_, severity_counts_, state_counts_, and total_alerts_.

|
inline |
Definition at line 152 of file alert_notifiers_example.cpp.
References mutex_, severity_counts_, state_counts_, and total_alerts_.
|
mutableprivate |
Definition at line 161 of file alert_notifiers_example.cpp.
Referenced by notify(), print_statistics(), and reset().
|
private |
Definition at line 160 of file alert_notifiers_example.cpp.
Referenced by name(), and print_statistics().
|
private |
Definition at line 163 of file alert_notifiers_example.cpp.
Referenced by notify(), print_statistics(), and reset().
|
private |
Definition at line 164 of file alert_notifiers_example.cpp.
Referenced by notify(), print_statistics(), and reset().
|
private |
Definition at line 162 of file alert_notifiers_example.cpp.
Referenced by notify(), print_statistics(), and reset().