Resource: Alert
An alert is the representation of a violation of an alert policy. It is a read-only resource that cannot be modified by the accompanied API.
JSON representation |
---|
{ "name": string, "state": enum ( |
Fields | |
---|---|
name |
Identifier. The name of the alert. The format is:
The |
state |
Output only. The current state of the alert. |
openTime |
The time when the alert was opened. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
closeTime |
The time when the alert was closed. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
resource |
The monitored resource type and any monitored resource labels preserved from the incident's generating condition. |
metadata |
The metadata of the monitored resource. |
metric |
The metric type and any metric labels preserved from the incident's generating condition. |
log |
The log information associated with the alert. This field is only populated for log-based alerts. |
policy |
The snapshot of the alert policy that generated this alert. |
State
The enumeration of possible states for an alert.
Enums | |
---|---|
STATE_UNSPECIFIED |
The alert state is unspecified. |
OPEN |
The alert is open. |
CLOSED |
The alert is closed. |
MonitoredResourceMetadata
Auxiliary metadata for a MonitoredResource
object. MonitoredResource
objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message.
JSON representation |
---|
{ "systemLabels": { object }, "userLabels": { string: string, ... } } |
Fields | |
---|---|
systemLabels |
Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example:
|
userLabels |
Output only. A map of user-defined metadata labels. |
Metric
A specific metric, identified by specifying values for all of the labels of a
.MetricDescriptor
JSON representation |
---|
{ "type": string, "labels": { string: string, ... } } |
Fields | |
---|---|
type |
An existing metric type, see |
labels |
The set of label values that uniquely identify this metric. All labels listed in the |
LogMetadata
Information about the log for log-based alerts.
JSON representation |
---|
{ "extractedLabels": { string: string, ... } } |
Fields | |
---|---|
extractedLabels |
The labels extracted from the log. |
PolicySnapshot
The state of the policy at the time the alert was generated.
JSON representation |
---|
{
"name": string,
"displayName": string,
"severity": enum ( |
Fields | |
---|---|
name |
The name of the alert policy resource. In the form of "projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]". |
displayName |
The display name of the alert policy. |
severity |
The severity of the alert policy. |
userLabels |
The user labels for the alert policy. |
Methods |
|
---|---|
|
Gets a single alert. |
|
Lists the existing alerts for the metrics scope of the project. |