GCP Integration
The GCP integration lets you send alerts from Google Cloud Platform into OpsiMate using webhook-based push notifications.
Instead of OpsiMate pulling alerts from GCP, your GCP alerting policies push alerts directly to OpsiMate.
Webhook URL​
Configure your GCP notification channel to send alerts to your OpsiMate server:
http://localhost:3001/api/v1/alerts/custom/gcp?api_token={your_api_token}
Replace {your_api_token} with the API token configured in your OpsiMate server.
API Token Configuration​
- With a config file (
CONFIG_FILEpoints to an existing file): the token issecurity.api_tokeninconfig.yml, and theAPI_TOKENenvironment variable is ignored. The shippeddocker-compose.yml, the Helm chart and the all-in-one image all run this way. Withdocker-compose.ymland the all-in-one image, thedefault-config.ymlthey start from sets it toopsimate. The Helm chart'sconfig.configYmldoes not set it, and itsAPI_TOKENsecret is ignored, so on Helm addapi_tokenundersecurityinconfig.configYml. - Without a config file: the token comes from the
API_TOKENenvironment variable, and falls back toopsimate.
Change the default for anything that is not a demo. See Configuration.
Send the token in any of these ways:
- the
api_tokenquery parameter:?api_token=YOUR_TOKEN - the
X-API-Tokenheader:X-API-Token: YOUR_TOKEN - the
Authorizationheader:Authorization: Bearer YOUR_TOKEN
Use the same value in the GCP webhook URL.
Setting Up the Webhook in GCP​
To send alerts from GCP to OpsiMate via webhook:
- In the Google Cloud Console, go to Monitoring → Alerting.
- Open Notification channels.
- Create or edit a Webhook notification channel.
- Set the Webhook URL to your OpsiMate endpoint, for example:
http://your-opsimate-host/api/v1/alerts/custom/gcp?api_token={your_api_token}
- Save the notification channel.
- Attach this webhook notification channel to the alerting policies you want to forward to OpsiMate.
What OpsiMate Shows for GCP Incidents​
Every webhook call GCP sends updates a single alert in OpsiMate, keyed by the GCP incident id:
| GCP field | Where it shows up in OpsiMate |
|---|---|
incident.incident_id | The alert id. Updates for the same incident always update the same alert. |
incident.policy_name | The alert name, or UNKNOWN if the policy has no name. |
incident.summary | The alert summary, or a default text if the incident has no summary. |
incident.policy_user_labels | The alert's tags. An owner label assigns the alert to that user if it has no owner yet. |
incident.started_at | The alert start time (unix seconds or an ISO date; falls back to the time the webhook arrived). |
incident.url | The View incident button on the alert. |
incident.documentation.content | A Documentation button, but only if the content is a plain http(s):// URL. |
While the incident is open, the alert stays firing in the alerts table with the GCP integration icon. When GCP closes the incident, OpsiMate automatically resolves the alert, so it moves to the Resolved list (it is not archived).
A webhook payload without an incident object — or one missing incident_id,
state, started_at or url — is rejected with HTTP 400.
Severity​
- Add a user label named
severityto the alerting policy (Policy → User labels), for exampleseverity: critical. - Allowed values are
critical,warningandinfo. Common synonyms (P1,error,high,disaster,low, ...) are mapped automatically, case-insensitive. - Unknown or missing values →
warning.
Important Disclaimer​
GCP sends alerts via webhook only to publicly reachable HTTP endpoints.
- If you are running OpsiMate locally (for example at
http://localhost:3001), GCP cannot call this URL directly from the internet. - For production use, deploy OpsiMate behind a publicly accessible URL (or expose it securely via tunneling / reverse proxy) so that GCP can reach the webhook endpoint.
Once configured, alerts pushed from GCP will appear in the alerts table in OpsiMate with the GCP integration icon, so you can easily identify their source.