Alert Center can be configured to send notification upon updates. To configure Alert Center to send notifications you need to configure your settings with the desired notification settings.
Google Cloud Pub/Sub notification
Alert Center can publish notifications to a Google Pub/Sub topic.
After creating a topic and granting alerts-api-push-notifications@system.gserviceaccount.com
publish permission to it use the Alert Center update settings API
to set that topic as a notification destination. Once configured, Alert Center
will publish a message to that topic for each update (e.g. when a new alert arrives).
Pub/Sub message attributes
Common attributes
alertcenter_resource_type
- The type of the resource. Currently supported value is"ALERT"
.alertcenter_resource_status
- The status of the resource. Currently supported value is"CREATED", "DELETED", "UNDELETED", "MODIFIED"
.alertcenter_payload_format
- The format of the payload (per notification settings). Currently supported value is"JSON"
.
Alert attributes
alertcenter_start_time
- The time the event that caused this alert was started or detected.alertcenter_end_time
- The time the event that caused this alert ceased being active.alertcenter_type
- The type of the alert. For a list of available alert types see Google Workspace Alert types.alertcenter_source
- A unique identifier for the system that reported the alert.alertcenter_create_time
- The time this alert was created.alertcenter_update_time
- The last time this alert was updated.
The message payload
The payload of the message depends on alertcenter_resource_type
. When resource type is "ALERT"
the payload will be one of the Alert Center alert types.
The format of the payload depends on alertcenter_payload_format
. When the format is "JSON"
the
payload would be base64-encoded
JSON.