Alert class
Alert
- Implemented types
Constructors
-
Alert({required String $id, required String $createdAt, required String $updatedAt, required String monitorId, required String projectId, required String name, required AlertStatus status, String? resolvedAt, String? acknowledgedAt, required String acknowledgedBy, required String acknowledgedByName, required String escalationId, required int escalationStep, required int escalationRound, String? escalatesAt, required List<
String> rules, required MonitorSeverity severity, AlertMetric? metric, AlertComparator? comparator, required double threshold, required double value, required double peak, required MonitorType type, required MonitorResourceType resourceType, required String resourceId, required int notifications, int? latency, MonitorResult? result}) -
Alert.fromMap(Map<
String, dynamic> map) -
factory
Properties
- $createdAt → String
-
Date the alert started firing, in ISO 8601 format.
final
- $id → String
-
Alert ID.
final
- $updatedAt → String
-
Alert update date in ISO 8601 format.
final
- acknowledgedAt → String?
-
Date a member acknowledged the alert, in ISO 8601 format. Empty while nobody has.
final
- acknowledgedBy → String
-
ID of the user who acknowledged the alert. Empty while nobody has, or when it was acknowledged with an API key.
final
- acknowledgedByName → String
-
Name of the user who acknowledged the alert, when they did.
final
- comparator → AlertComparator?
-
How the metric was compared with the threshold. Null for a probe monitor's alert.
final
- escalatesAt → String?
-
When the next step is notified, in ISO 8601 format. Null when nothing is due: the alert was acknowledged or resolved, or every step has gone out.
final
- escalationId → String
-
ID of the escalation notifying the team of this alert. Empty when the monitor notified its
notifyroles instead.final - escalationRound → int
-
How many times the escalation's steps have been repeated for this alert.
final
- escalationStep → int
-
Index of the escalation's next step to notify, counting from 0. Equal to the number of steps once the last round has gone out.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- latency → int?
-
Probe monitors: response time in milliseconds of the latest check recorded on the alert.
final
- metric → AlertMetric?
-
Metric the alert fired on. Null for a probe monitor's alert.
final
- monitorId → String
-
ID of the monitor that raised the alert.
final
- name → String
-
Name of the monitor when the alert fired.
final
- notifications → int
-
How many times the alert was announced as firing: once when it fired, and again after each cooldown while it kept firing.
final
- peak → double
-
Reading furthest past the threshold while the alert fired.
final
- projectId → String
-
ID of the project the alert is about. Empty for an alert of the whole organization.
final
- resolvedAt → String?
-
Date the alert resolved, in ISO 8601 format. Empty while it fires.
final
- resourceId → String
-
ID of the resource the alert fired on. The project ID for a project-wide monitor.
final
- resourceType → MonitorResourceType
-
Type of the resource the alert fired on: the project, or one database, bucket, function or site.
final
- result → MonitorResult?
-
What the failing check of a probe monitor found when the alert opened, such as
connect_refused. Null for a usage monitor's alert.final -
rules
→ List<
String> -
The monitor's rules when the alert fired, as query strings.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → MonitorSeverity
-
The monitor's severity when the alert fired:
info,warning,errororcritical.final - status → AlertStatus
-
Whether the alert is still firing or has resolved.
final
- threshold → double
-
Threshold the metric crossed, in the metric's unit.
final
- type → MonitorType
-
Type of the monitor that raised the alert.
final
- value → double
-
Latest reading while the alert fired: the metric's value for a usage monitor, and for a probe monitor its
latency.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited