Alert descriptor, used with ecs_alert_init().
More...
#include <alerts.h>
Alert descriptor, used with ecs_alert_init().
Definition at line 77 of file alerts.h.
◆ _canary
int32_t ecs_alert_desc_t::_canary |
◆ brief
const char* ecs_alert_desc_t::brief |
Description of alert.
Will only be set if FLECS_DOC addon is enabled
Definition at line 103 of file alerts.h.
◆ doc_name
const char* ecs_alert_desc_t::doc_name |
User friendly name.
Will only be set if FLECS_DOC addon is enabled.
Definition at line 100 of file alerts.h.
◆ entity
Entity associated with alert.
Definition at line 81 of file alerts.h.
◆ id
(Component) id of member to monitor.
If left to 0 this will be set to the parent entity of the member (optional).
Definition at line 128 of file alerts.h.
◆ member
Alert when member value is out of range.
Uses the warning/error ranges assigned to the member in the MemberRanges component (optional).
Definition at line 124 of file alerts.h.
◆ message
const char* ecs_alert_desc_t::message |
Template for alert message.
This string is used to generate the alert message and may refer to variables in the query result. The format for the template expressions is as specified by ecs_script_string_interpolate().
Examples:
"$this has Position but not Velocity"
"$this has a parent entity $parent without Position"
Definition at line 97 of file alerts.h.
◆ query
Alert query.
An alert will be created for each entity that matches the specified query. The query must have at least one term that uses the $this variable (default).
Definition at line 86 of file alerts.h.
◆ retain_period
The retain period specifies how long an alert must be inactive before it is cleared.
This makes it easier to track noisy alerts. While an alert is inactive its duration won't increase. When the retain period is 0, the alert will clear immediately after it no longer matches the alert query.
Definition at line 120 of file alerts.h.
◆ severity
Metric kind.
Must be EcsAlertInfo, EcsAlertWarning, EcsAlertError or EcsAlertCritical. Defaults to EcsAlertError.
Definition at line 107 of file alerts.h.
◆ severity_filters
Severity filters can be used to assign different severities to the same alert.
This prevents having to create multiple alerts, and allows entities to transition between severities without resetting the alert duration (optional).
Definition at line 113 of file alerts.h.
◆ var
const char* ecs_alert_desc_t::var |
Variable from which to fetch the member (optional).
When left to NULL 'id' will be obtained from $this.
Definition at line 132 of file alerts.h.
The documentation for this struct was generated from the following file: