Skip to main content
Sync Google Cloud Monitoring, Error Reporting, Security Command Center, and Cloud Billing budget alerts to Flashduty through a webhook or a Pub/Sub push subscription.

In Flashduty

You can get the integration push URL in either of the following ways.

Use a dedicated integration

Choose this option if all alerts go to one channel. It’s the simpler setup.
  1. In the Flashduty console, select Channel and open a channel
  2. Select Configuration → Integrations → Private integration, then click Add an integration
  3. Choose Google Cloud Monitoring integration and click Save to generate a card
  4. Open the generated integration card and copy the Push URL

Use a shared integration

Choose this option if you need to route alerts to different channels based on the alert payload.
  1. In the Flashduty console, go to Integration Center → Alert Events
  2. Select Google Cloud Monitoring integration:
    • Integration Name: Define a name for this integration
  3. Configure the default route and select a channel. You can add more rules under Routing after creation
  4. Click Save and copy the generated Push URL

In Google Cloud

The push URL of one GCP Cloud Monitoring integration accepts all of the following sources. No code runs in Google Cloud.Below, push URL means the integration push URL you copied earlier, in the form https://api.flashcat.cloud/event/push/alert/google-cm?integration_key=<integration key>.

Cloud Monitoring: webhook notification channel

Step 1: Configure alert channel

  1. Log in to the Google Cloud Console, search for the Monitoring product, and enter its console
  2. Find Alerting in the left menu and click EDIT NOTIFICATION CHANNELS to create a channel drawing
  3. Find Webhooks on the Notification channels page and click ADD NEW
  4. Enter the integration push URL in the Endpoint URL field (the URL will be generated after saving the integration name on the current page)
  5. Enter Flashduty in the Display Name field
  6. Click TEST CONNECTION and then SAVE to complete
drawing

Step 2: Use Flashduty alert channel in alert policy

  1. Return to the Alerting page
  2. Create or edit an existing policy
  3. Skip other policy configurations (configure alert conditions according to business requirements)
  4. On the Notifications and name page, keep Use notification channel enabled
  5. Select the Flashduty channel created in Step 1 from the Notification channels dropdown, and check Notify on incident closure
  6. Complete other configurations and save the policy
drawingMetric alerts, uptime checks, log-based alerts, and PromQL alerts (Managed Service for Prometheus) are all sent by alerting policies and are configured the same way.

Cloud Monitoring: Pub/Sub notification channel

If your organization requires alerts to go through Pub/Sub, use a Pub/Sub notification channel. The Alert Key is the same as for the webhook channel (incident_id), so the two channels are interchangeable.
  1. Create the topic and push subscription as described in Create a Pub/Sub push subscription.
  2. In Alerting → EDIT NOTIFICATION CHANNELS, click ADD NEW in the Pub/Sub section and enter the topic name.
  3. As prompted, grant service-<project number>@gcp-sa-monitoring-notification.iam.gserviceaccount.com the Pub/Sub Publisher role on the topic.
  4. Select this Pub/Sub channel in the alerting policy’s Notification channels and check Notify on incident closure.

Error reporting

Error Reporting sends notifications through Cloud Monitoring webhook notification channels (schema version 1.0). It supports webhooks only, not Pub/Sub.
  1. Create a webhook notification channel as in step 1 of Cloud Monitoring: webhook notification channel (you can reuse the same Flashduty channel).
  2. Open the Error Reporting page and click Configure notifications.
  3. Select the Flashduty channel under Notification channels and save.
Error Reporting sends a notification when an error cannot be grouped with existing errors, and when an error group marked Resolved occurs again.
  • One error group (same project, same error details link) maps to one alert. A notification for the same group merges into the alert while it is still open.
  • Error Reporting sends no “resolved” notification, so the alert never recovers by itself. Close it in Flashduty.
  • Alerts have Warning severity. To use another severity, append &severity=Critical (or Info) to the push URL.

Security Command Center

Security Command Center (SCC) can only continuously export findings to Pub/Sub. A push subscription forwards them to Flashduty.
  1. Create the topic and push subscription as described in Create a Pub/Sub push subscription.
  2. Grant the SCC service account the Pub/Sub Publisher role on the topic, then create a continuous export (NotificationConfig), for example:
Do not add state="ACTIVE" to the filter. SCC only publishes finding updates that match the filter, so with state="ACTIVE" the update that makes a finding INACTIVE never arrives and the Flashduty alert cannot recover automatically.
  • The finding’s resource name, finding.name, is the Alert Key, so every update to one finding merges into one alert.
  • The alert recovers when the finding’s state becomes INACTIVE (remediated, resource deleted, or set by hand) or its mute becomes MUTED. It triggers again when the finding becomes ACTIVE or UNMUTED.
  • Threat findings (for example, from Event Threat Detection) never become INACTIVE automatically. Change their state or mute them in SCC.

Cloud Billing budgets

Budget alerts are available only as programmatic notifications through Pub/Sub.
  1. Create the topic and push subscription as described in Create a Pub/Sub push subscription.
  2. Go to Billing → Budgets & alerts, create or edit a budget, and set threshold rules (actual and/or forecasted cost).
  3. Under Manage notifications, check Connect a Pub/Sub topic to this budget, select the topic above, and save.
Cloud Billing publishes the budget’s current status to the topic several times a day. The first message can take several hours. Flashduty handles the messages as follows:
  • A message that exceeds no threshold creates no alert.
  • Actual cost (alertThresholdExceeded) and forecasted cost (forecastThresholdExceeded) create separate alerts.
  • The Alert Key combines the billing account, budget, budget period, cost type, and the highest threshold exceeded. Repeated messages for the same threshold merge into one alert. Crossing a higher threshold creates a new alert.
  • Budget alerts never recover automatically. When a new budget period starts, alerts are tracked for the new period. Close alerts from the previous period by hand.

Create a Pub/Sub push subscription

Sections II, IV, and V share these steps. One push subscription can carry several sources.
  1. Go to Pub/Sub → Topics and click CREATE TOPIC (or use an existing topic).
  2. In the topic, click CREATE SUBSCRIPTION:
    • Delivery type: select Push.
    • Endpoint URL: enter the integration push URL.
    • Enable authentication: leave unchecked. The integration_key in the push URL authenticates the request; Flashduty does not check Pub/Sub identity tokens.
    • Enable payload unwrapping: leave unchecked. Flashduty needs the message attributes (such as a budget’s budgetId), which unwrapping drops.
  3. Save the subscription.
Flashduty returns 200 and logs the message when a Pub/Sub message cannot become an alert (for example, an unknown format), so Pub/Sub does not redeliver it forever.

Severity mapping

Cloud Monitoring (same for webhook and Pub/Sub)Security Command CenterCloud Billing budgetsError Reporting: always Warning; change it with the severity push URL parameter.

Alert labels

Cloud Monitoring resource labels and metadata labels never overwrite an existing label with the same name.

FAQ

No. The integration_key in the push URL identifies the integration. Leave Enable authentication unchecked.
  • The first message can take several hours.
  • A message that exceeds no threshold creates no alert.
  • Check whether Enable payload unwrapping is checked on the push subscription. Unwrapping drops the message attributes, so Flashduty cannot identify the budget.
Check whether the NotificationConfig filter contains state="ACTIVE", and whether the finding is a threat finding, which never becomes INACTIVE automatically.