50 AlertEvent(
const std::string& metricName,
const EAlertLevel alertLevel,
const float currentReadingValue,
const float valueThreshold,
const std::string& eventSummary);
A single alert event: a metric crossing (or recovering from) a threshold, with the reading that trigg...
Definition: AlertEvent.h:13
float myValueThreshold
The limit it crossed.
Definition: AlertEvent.h:18
float myCurrentReadingValue
The reading that triggered the event.
Definition: AlertEvent.h:17
float GetValueThreshold() const
Gets the threshold the reading crossed.
Definition: AlertEvent.cpp:112
float GetCurrentReadingValue() const
Gets the reading that triggered the event.
Definition: AlertEvent.cpp:95
std::string myEventSummary
Human-readable summary.
Definition: AlertEvent.h:19
void SetEventSummary(const std::string &eventSummary)
Sets the human-readable summary of the event.
Definition: AlertEvent.cpp:214
void SetCurrentReadingValue(const float currentReadingValue)
Sets the reading that triggered the event.
Definition: AlertEvent.cpp:180
void SetValueThreshold(const float currentValueThreshold)
Sets the threshold the reading crossed.
Definition: AlertEvent.cpp:197
virtual ~AlertEvent()=default
Defaulted destructor.
const std::string & GetMetricName() const
Gets the metric that triggered the event.
Definition: AlertEvent.cpp:61
const std::string & GetEventSummary() const
Gets the human-readable summary of the event.
Definition: AlertEvent.cpp:129
void SetAlertLevel(const EAlertLevel alertLevel)
Sets the alert level of the event.
Definition: AlertEvent.cpp:163
EAlertLevel myAlertLevel
OK (recovered), Warning, or Alert.
Definition: AlertEvent.h:16
AlertEvent()
Builds an undefined alert event (OK level, sentinel -1 values).
Definition: AlertEvent.cpp:15
void SetMetricName(const std::string &metricName)
Sets the metric that triggered the event.
Definition: AlertEvent.cpp:146
std::string myMetricName
The metric that triggered the event, e.g. "SystemTemperature".
Definition: AlertEvent.h:15
EAlertLevel GetAlertLevel() const
Gets the alert level of the event.
Definition: AlertEvent.cpp:78
std::string ToString() const
Serializes the metric, alert level, triggering reading, threshold, and summary to a string.
Definition: AlertEvent.cpp:231
RumPi is the library's top-level facade.
Definition: AlertManager.h:6
EAlertLevel
Severity of a metric relative to its thresholds.
Definition: Common.h:94