1
---
2
name: servicehealth-incident-correlation
3
metadata:
4
version: "1.0.0"
5
category: CloudObservabilityAndMonitoring
6
description: >-
7
Checks Personalized Service Health (PSH) events and resource-level impacts to
8
determine whether a Google Cloud incident affects a project or its resources,
9
returning an impact verdict with affected resources, published symptoms, and
10
workarounds. Use when asked whether Google Cloud is having an outage or
11
affecting a project or its resources, when looking up a PSH event, or when
12
triaging live Google Cloud workload issues or alerts whose symptoms suggest a
13
possible Google Cloud service disruption—even if the user does not suspect an
14
outage. Don't use for local code or build errors, routine alerts or
15
automations that neither ask for a service health check nor suggest a platform
16
disruption, configuring PSH alerts, or checking non-project-specific public
17
status.
18
---
19
20
# Personalized Service Health incident correlation
21
22
Correlates
23
[Personalized Service Health (PSH)](https://docs.cloud.google.com/service-health/docs/overview.md.txt)
24
events (`v1`) and resource-level impacts (`v1beta`, Preview) with observed
25
workload symptoms (product, location, resource, time) to return a per-project
26
impact verdict. Read-only: relay published PSH symptoms and workarounds without
27
modifying resources or inventing incident data.
28
29
> [!IMPORTANT]
30
> **The costliest mistake is a false all-clear.** Telling a responder "not
31
> Google" during an active Google Cloud incident misdirects incident response.
32
> When a PSH events call fails or the customer's product is not covered by PSH,
33
> the verdict is `INCONCLUSIVE`, never `NO_IMPACT_IDENTIFIED`.
34
35
## Usage Attribution
36
37
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
38
MUST read and follow the instructions in
39
[Usage Attribution](references/attribution.md).
40
41
## Prerequisites
42
43
* **Target project:** Pass `{project_id}` explicitly on every call; never run
44
`gcloud config set project`.
45
* **Billing:** The project must have an active billing account attached.
46
* **API enablement:** Requires `servicehealth.googleapis.com` on
47
`{project_id}` (`gcloud services enable servicehealth.googleapis.com
48
--project={project_id}`; ask before enabling). Resource-level impacts
49
(Preview) require enablement at least **24 hours before** an incident
50
starts.
51
* **Authentication & IAM:** Authenticate via `gcloud auth login`,
52
`gcloud auth application-default login`, or
53
`GOOGLE_APPLICATION_CREDENTIALS` (install the
54
[Google Cloud CLI](https://docs.cloud.google.com/sdk/docs/install-sdk.md.txt)
55
if `gcloud` is missing). Requires `roles/servicehealth.viewer` on
56
`{project_id}` (`servicehealth.events.*` and `servicehealth.impacts.*`;
57
custom roles may omit `impacts`), plus `roles/mcp.toolUser` for remote MCP.
58
* **Transports:** Use the
59
[PSH remote MCP server](https://docs.cloud.google.com/service-health/docs/use-service-health-mcp.md.txt)
60
(`https://servicehealth.googleapis.com/mcp`, scope
61
`https://www.googleapis.com/auth/servicehealth.readonly`). Read
62
[REST API and gcloud fallback](references/rest-fallback.md) only if the MCP
63
server is unavailable.
64
65
## Workflow
66
67
### Step 1: Determine scope
68
69
1. **Project ID.** Query only a project named in the prompt/conversation, an
70
alert payload (`incident.resource.labels.project_id`, else
71
`incident.scoping_project_id`), a resource path `projects/{project_id}/...`,
72
or caller context. **Never fall back to the host's default `gcloud` project
73
or `GOOGLE_CLOUD_PROJECT`**: querying the agent's own host project produces
74
false signals for unrelated stacks.
75
2. **Observed context.** Extract any product, location, named resource, and
76
reference time (alert `incident.started_at` in Unix seconds, a user-given
77
time with relative times such as "20 minutes ago" converted to UTC, or
78
now).
79
3. **Missing scope.**
80
* *Interactive:* Ask only when an essential identifier is missing (an
81
unnamed workload project ID, or a question about a specific event
82
without its event ID). When no workload project was named, ask solely
83
for the Google Cloud project ID without issuing an impact verdict
84
(`Status: ...`) or listing events from any environment, host, or quota
85
project. Broad checks ("Are there any outages?") for a named project
86
need no narrowing by service or region.
87
* *Headless (alert, notification, or automated caller):* Never wait for
88
human input; when no workload project ID is present, return
89
`INCONCLUSIVE` right away, naming the missing project ID, without
90
substituting any environment or quota project.
91
4. **PSH coverage.** Whenever web access is available, fetch the live
92
[Supported products and locations](https://docs.cloud.google.com/service-health/docs/supported-products-locations.md.txt)
93
page first; otherwise use the [PSH coverage](references/coverage.md)
94
snapshot. Both list onboarded products and mark emerging incident (`*`),
95
`IMPACTED` relevance (`†`), and resource-level impact (`‡`, Preview)
96
support.
97
98
### Step 2: Retrieve incidents (bounded)
99
100
All PSH resources use `parent` `projects/{project_id}/locations/global`. Pass
101
`pageSize: 100` and follow all `nextPageToken` pages (`list_project_events`
102
defaults to `pageSize=10` and orders results alphabetically by `event_id`, not
103
newest-first). Take event resource names verbatim from retrieved events or the
104
prompt.
105
106
MCP tools:
107
108
* `list_project_events` (`parent`, `filter`, `pageSize`, `pageToken`): lists
109
events without `updates`. Each `eventImpacts` entry carries the granular
110
status of one product/location pair: `state` (`AFFECTED` or `RESOLVED`),
111
`startTime`, and `endTime`. Filterable fields (space-joined AND):
112
`category`, `state`, `update_time`, and
113
`event_impacts.product.product_name` (repeated field: requires `:` for
114
exact, case-sensitive element match; `=` fails with `invalid filter`).
115
**`relevance`, location, `startTime`, and `endTime` are not filterable.**
116
* `get_project_event` (`name`): fetches one event with `updates` (symptoms and
117
workarounds).
118
* `list_project_impacts` (`parent`, `filter`, `pageSize`, `pageToken`): lists
119
resource-level impacts (Preview `Impact` resources); scope it per event as
120
in Step 3.
121
* `get_project_impact` (`name`): fetches one resource-level impact by ID.
122
123
**Always pass a bounded `filter` on `list_project_events`** (and `?filter=` or
124
`--filter=` on REST/`gcloud`) unless the user explicitly asks for the full
125
event history, since an unfiltered call returns the full historical archive:
126
127
| Situation | Event `filter` |
128
| :--- | :--- |
129
| Live/ongoing check with no symptom start time ("Is anything down right now?") | `state=ACTIVE` |
130
| Correlating a symptom or alert start time (`YYYY-MM-DD...`, Unix `started_at`, or a relative time such as "20 minutes ago" converted to UTC) | `state=ACTIVE OR update_time>="{reference_time_minus_24h}"` |
131
| Product known (exact, case-sensitive name from `coverage.md`; combine variants with `OR`, or omit only the product clause while keeping `state` or `update_time` and match `productName` client-side) | add `event_impacts.product.product_name:"{product_name}"` |
132
| Recently resolved check (only when asked) | `update_time>="{now_minus_n_hours}"` |
133
134
For example, correlating symptoms that started at 2026-10-16T14:05:00Z on
135
Compute Engine (attribution prefix from Usage Attribution omitted):
136
137
```bash
138
# MCP
139
list_project_events {"parent": "projects/{project_id}/locations/global",
140
"filter": "state=ACTIVE OR update_time>=\"2026-10-15T14:05:00Z\"",
141
"pageSize": 100}
142
143
# gcloud fallback: --filter is required here too
144
gcloud service-health events list --project={project_id} --location=global \
145
--page-size=100 --format=json \
146
--filter='state=ACTIVE OR update_time>="2026-10-15T14:05:00Z"'
147
```
148
149
Quote RFC 3339 timestamps (`update_time>="2026-09-01T00:00:00Z"`). Save large
150
responses to a temp file outside the repository rather than reading raw JSON
151
into context, and summarize large multi-event listings by product and location.
152
153
### Step 3: Correlate with what was observed
154
155
1. **Product and location.** Keep incidents matching the observed product and
156
location (or all active incidents on a general project check). Regions,
157
zones, multi-regions (such as `us`, `europe`, `asia`), and `global` are
158
distinct PSH locations, and any hierarchy between them is product-specific:
159
* Exact location named (e.g., `europe-west1` or `us-west1-a`): stay within
160
that exact location for the impact verdict. If no incident matches that
161
exact location, still mention active or recently closed incidents in
162
proximate locations (e.g., other zones in `us-west1`, its containing
163
region, or a `europe` multi-region incident) as helpful context without
164
marking the project `IMPACTED`.
165
* Vague location named (e.g., "Europe" or "US"): match broadly across
166
every location that fits the description.
167
168
If an `eventImpacts` entry omits `location` (e.g., emerging or informational
169
events), check `title` and `description` before ruling out a location match.
170
2. **Event state.** Before checking the timeline:
171
* `detailedState` `MERGED`: consolidated into `parentEvent`, not resolved.
172
Because closed (`MERGED`) events receive no further updates, follow
173
`parentEvent` via `get_project_event` until reaching a root event that
174
is not `MERGED`, and replace the merged events with it. Treat the root
175
event as the **single source of truth** for active/closed state,
176
`relevance`, impact verdict, linked `impacts`, and published
177
symptoms/workarounds (never carry forward superseded child symptoms, and
178
assess the root event even when its `eventImpacts` names an underlying
179
service).
180
* `detailedState` `EMERGING` (Google is still investigating): an active
181
incident, reported with the emerging-incident wording in Step 5.
182
* `detailedState` `FALSE_POSITIVE` or `AUTO_CLOSED`: does **not** match.
183
3. **Timeline.** Pick the window, then compare the reference time with it.
184
* *Window:* when a location was named, use the `eventImpacts` entries
185
matching the observed product and location. The window opens at their
186
earliest `startTime`, stays open while any of them is `AFFECTED`, and
187
closes at their latest `endTime` once all are `RESOLVED`, even if the
188
event stays `ACTIVE` elsewhere. Otherwise, or when the matching entries
189
carry no granular status, use the event's `startTime` to `endTime` (open
190
while the event is `ACTIVE`).
191
* *Comparison* (`startTime` often lags symptom onset):
192
* Reference time inside the window: **matches**.
193
* Up to **4 hours before** the window opens: **matches** (note that
194
symptoms preceded `startTime`).
195
* More than 4 hours before the window opens: does **not** match
196
(mention only as a possible aggravating factor since `startTime`).
197
* Window closed within **1 hour before** the reference time: **recent
198
close** (`INCONCLUSIVE`); state how long before the reference time
199
it closed.
200
* Window closed more than 1 hour before the reference time: does
201
**not** match.
202
4. **Event details.** Call `get_project_event` for surviving matches and read
203
the latest update's symptom and workaround (unless full history was
204
requested).
205
5. **Resource-level impacts (informational only).** Query
206
`list_project_impacts` (or its REST/`gcloud beta` equivalent) with
207
`filter` `events:"{event.name}"` for every
208
surviving incident (the root event, never a `MERGED` one) and report what
209
it returns, but never derive the verdict from it. Even for products with
210
resource-level impact coverage, product teams can detect resource-level
211
impact only for some incidents and PSH does not say which, so an empty list
212
never means "not impacted".
213
* `asset.assetName` uses numeric `{project_number}`, not `{project_id}`—
214
match customer-named resources by `assetType`, location, and resource
215
name. If a named resource is absent while other project resources
216
appear, report both facts.
217
6. **Fresh state.** Re-fetch incident data from earlier turns or alert payloads
218
before issuing a verdict.
219
220
### Step 4: Issue the verdict
221
222
PSH `Event.relevance` and the skill verdict are distinct, and the verdict comes
223
from events only: resource-level impact results (listed impacts, an empty list,
224
or a failed call) never change it.
225
226
1. **`IMPACTED`** if any matching incident's `Event.relevance` is `IMPACTED`
227
or `RELATED`. The verdict makes no distinction between the two; Step 5
228
reports each event's `relevance`. **Never treat `RELATED` as "not impacted"
229
or skip it when asked for "only impacting" incidents**: it is PSH's
230
strongest signal for products without project-level or resource-level
231
impact support.
232
2. **`INCONCLUSIVE`** if the `events` call failed, the observed product is not
233
onboarded to PSH, the project ID is missing in a headless flow, or a
234
matching incident's window (Step 3) closed within 1 hour before the
235
reference time. State why. A failed `impacts` call alone never makes the
236
verdict `INCONCLUSIVE`.
237
3. **`NO_IMPACT_IDENTIFIED`** when `events` succeeded for a PSH-covered product
238
and:
239
* No incident matches, **or**
240
* Every match has a `relevance` other than `IMPACTED` or `RELATED`
241
(`NOT_IMPACTED`, `PARTIALLY_RELATED`, or `UNKNOWN`).
242
243
**Never present this as an all-clear**: incident declaration can lag
244
symptoms. State this caveat and suggest checking the workload or re-checking
245
PSH if symptoms persist.
246
247
### Step 5: Report
248
249
Report in concise prose for interactive and headless callers alike, with the
250
granular status table below (see
251
[Report examples](references/report-examples.md)). For multi-project checks,
252
give each project its own verdict and describe shared incidents once. Include in
253
order:
254
255
1. **Impact verdict** (one per project; use these exact tokens, the second
256
`IMPACTED` form for `EMERGING` incidents, and list every matching event ID):
257
* `Status: IMPACTED -- Project {project_id} is affected by incident {event_id} (PSH relevance {relevance}).`
258
* `Status: IMPACTED -- Project {project_id} matches emerging incident {event_id}, which Google is still investigating (PSH relevance {relevance}).`
259
* `Status: NO_IMPACT_IDENTIFIED -- No PSH incident impacting project {project_id} was identified at this time.`
260
* `Status: INCONCLUSIVE -- Impact on project {project_id} could not be determined: {reason}.`
261
2. **Project ID source** (prompt, alert payload, resource name, request
262
context).
263
3. **Event summary** (one per matching event; every active event on a general
264
project check): title, event ID, `relevance`, state, window, and how it
265
correlates with observed symptoms. List incidents in proximate locations
266
separately as context.
267
4. **Granular status** (per event, right after its summary): a table with one
268
row per `eventImpacts` entry, so the status of each product and location
269
stands out (omit it when no entry carries granular status):
270
271
| Product | Location | Status | Start | End |
272
| :--- | :--- | :--- | :--- | :--- |
273
| {productName} | {locationName} | {AFFECTED or RESOLVED} | {startTime} | {endTime, or "ongoing"} |
274
5. **Resource-level impacts** (per event): each returned impact's
275
`assetName`, `assetType`, and `description`/timestamps, or when none were
276
returned:
277
* Empty `impacts` on a product with resource-level impact coverage: `"PSH
278
has not listed any resource-level impacts for this incident.
279
Resource-level impacts are not available for every {product} incident
280
yet, so this project can still be impacted."`
281
* Empty `impacts` on a product/resource type without coverage:
282
`"Resource-level impacts are not supported for
283
{product_or_resource_type} yet."`
284
* Failed `impacts` call: `"Resource-level impacts could not be retrieved:
285
{reason}"`, with the same failure detail as for a failed `events` call
286
(never claim none were listed, and never invent resource names)
287
6. **Symptoms and workarounds** (per event): quote the latest update ("No
288
workaround published" if empty).
289
7. **PSH links**: per event,
290
`https://console.cloud.google.com/servicehealth/incidentDetails/{event_name}?project={project_id}`
291
(`/` in `event.name` encoded as `%2F`); and in every report whose project ID
292
is known, whatever the verdict, the events dashboard
293
`https://console.cloud.google.com/servicehealth/incidents?project={project_id}`.
294
295
## References
296
297
Read each reference only when its condition applies, to keep context small:
298
299
* [Usage Attribution](references/attribution.md): before the first command.
300
* [PSH coverage: supported products and resource-level impacts](references/coverage.md):
301
only when the live Supported products and locations page cannot be fetched.
302
* [Errors and resolutions](references/errors.md): only after a call fails.
303
* [REST API and gcloud fallback](references/rest-fallback.md): only when MCP
304
is unavailable.
305
* [Report examples](references/report-examples.md): when writing the report.
306
* [PSH concepts](https://docs.cloud.google.com/service-health/docs/concepts.md.txt)
307
and [PSH MCP reference](https://docs.cloud.google.com/service-health/docs/reference/mcp.md.txt)
308