Installation

Install as Agent Plugin Recommended
copilot plugin marketplace add samueltauil/skills-hub
copilot plugin install servicehealth-incident-correlation@skills-hub

Works with GitHub Copilot CLI and VS Code (enable chat.plugins.enabled). Plugin servicehealth-incident-correlation v1.0.0 follows the Agent Plugins spec.

Install with the gh extension
gh skills-hub install servicehealth-incident-correlation

Don't have the extension? Run gh extension install samueltauil/skills-hub first.

Download and extract to your repository:

.github/skills/servicehealth-incident-correlation/

Extract the ZIP to .github/skills/ in your repo. The folder name must match servicehealth-incident-correlation for Copilot to auto-discover it.

Skill Files (6)

SKILL.md 17.3 KB
---
name: servicehealth-incident-correlation
metadata:
  version: "1.0.0"
  category: CloudObservabilityAndMonitoring
description: >-
  Checks Personalized Service Health (PSH) events and resource-level impacts to
  determine whether a Google Cloud incident affects a project or its resources,
  returning an impact verdict with affected resources, published symptoms, and
  workarounds. Use when asked whether Google Cloud is having an outage or
  affecting a project or its resources, when looking up a PSH event, or when
  triaging live Google Cloud workload issues or alerts whose symptoms suggest a
  possible Google Cloud service disruption—even if the user does not suspect an
  outage. Don't use for local code or build errors, routine alerts or
  automations that neither ask for a service health check nor suggest a platform
  disruption, configuring PSH alerts, or checking non-project-specific public
  status.
---

# Personalized Service Health incident correlation

Correlates
[Personalized Service Health (PSH)](https://docs.cloud.google.com/service-health/docs/overview.md.txt)
events (`v1`) and resource-level impacts (`v1beta`, Preview) with observed
workload symptoms (product, location, resource, time) to return a per-project
impact verdict. Read-only: relay published PSH symptoms and workarounds without
modifying resources or inventing incident data.

> [!IMPORTANT]
> **The costliest mistake is a false all-clear.** Telling a responder "not
> Google" during an active Google Cloud incident misdirects incident response.
> When a PSH events call fails or the customer's product is not covered by PSH,
> the verdict is `INCONCLUSIVE`, never `NO_IMPACT_IDENTIFIED`.

## Usage Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
MUST read and follow the instructions in
[Usage Attribution](references/attribution.md).

## Prerequisites

*   **Target project:** Pass `{project_id}` explicitly on every call; never run
    `gcloud config set project`.
*   **Billing:** The project must have an active billing account attached.
*   **API enablement:** Requires `servicehealth.googleapis.com` on
    `{project_id}` (`gcloud services enable servicehealth.googleapis.com
    --project={project_id}`; ask before enabling). Resource-level impacts
    (Preview) require enablement at least **24 hours before** an incident
    starts.
*   **Authentication & IAM:** Authenticate via `gcloud auth login`,
    `gcloud auth application-default login`, or
    `GOOGLE_APPLICATION_CREDENTIALS` (install the
    [Google Cloud CLI](https://docs.cloud.google.com/sdk/docs/install-sdk.md.txt)
    if `gcloud` is missing). Requires `roles/servicehealth.viewer` on
    `{project_id}` (`servicehealth.events.*` and `servicehealth.impacts.*`;
    custom roles may omit `impacts`), plus `roles/mcp.toolUser` for remote MCP.
*   **Transports:** Use the
    [PSH remote MCP server](https://docs.cloud.google.com/service-health/docs/use-service-health-mcp.md.txt)
    (`https://servicehealth.googleapis.com/mcp`, scope
    `https://www.googleapis.com/auth/servicehealth.readonly`). Read
    [REST API and gcloud fallback](references/rest-fallback.md) only if the MCP
    server is unavailable.

## Workflow

### Step 1: Determine scope

1.  **Project ID.** Query only a project named in the prompt/conversation, an
    alert payload (`incident.resource.labels.project_id`, else
    `incident.scoping_project_id`), a resource path `projects/{project_id}/...`,
    or caller context. **Never fall back to the host's default `gcloud` project
    or `GOOGLE_CLOUD_PROJECT`**: querying the agent's own host project produces
    false signals for unrelated stacks.
2.  **Observed context.** Extract any product, location, named resource, and
    reference time (alert `incident.started_at` in Unix seconds, a user-given
    time with relative times such as "20 minutes ago" converted to UTC, or
    now).
3.  **Missing scope.**
    *   *Interactive:* Ask only when an essential identifier is missing (an
        unnamed workload project ID, or a question about a specific event
        without its event ID). When no workload project was named, ask solely
        for the Google Cloud project ID without issuing an impact verdict
        (`Status: ...`) or listing events from any environment, host, or quota
        project. Broad checks ("Are there any outages?") for a named project
        need no narrowing by service or region.
    *   *Headless (alert, notification, or automated caller):* Never wait for
        human input; when no workload project ID is present, return
        `INCONCLUSIVE` right away, naming the missing project ID, without
        substituting any environment or quota project.
4.  **PSH coverage.** Whenever web access is available, fetch the live
    [Supported products and locations](https://docs.cloud.google.com/service-health/docs/supported-products-locations.md.txt)
    page first; otherwise use the [PSH coverage](references/coverage.md)
    snapshot. Both list onboarded products and mark emerging incident (`*`),
    `IMPACTED` relevance (`†`), and resource-level impact (`‡`, Preview)
    support.

### Step 2: Retrieve incidents (bounded)

All PSH resources use `parent` `projects/{project_id}/locations/global`. Pass
`pageSize: 100` and follow all `nextPageToken` pages (`list_project_events`
defaults to `pageSize=10` and orders results alphabetically by `event_id`, not
newest-first). Take event resource names verbatim from retrieved events or the
prompt.

MCP tools:

*   `list_project_events` (`parent`, `filter`, `pageSize`, `pageToken`): lists
    events without `updates`. Each `eventImpacts` entry carries the granular
    status of one product/location pair: `state` (`AFFECTED` or `RESOLVED`),
    `startTime`, and `endTime`. Filterable fields (space-joined AND):
    `category`, `state`, `update_time`, and
    `event_impacts.product.product_name` (repeated field: requires `:` for
    exact, case-sensitive element match; `=` fails with `invalid filter`).
    **`relevance`, location, `startTime`, and `endTime` are not filterable.**
*   `get_project_event` (`name`): fetches one event with `updates` (symptoms and
    workarounds).
*   `list_project_impacts` (`parent`, `filter`, `pageSize`, `pageToken`): lists
    resource-level impacts (Preview `Impact` resources); scope it per event as
    in Step 3.
*   `get_project_impact` (`name`): fetches one resource-level impact by ID.

**Always pass a bounded `filter` on `list_project_events`** (and `?filter=` or
`--filter=` on REST/`gcloud`) unless the user explicitly asks for the full
event history, since an unfiltered call returns the full historical archive:

| Situation | Event `filter` |
| :--- | :--- |
| Live/ongoing check with no symptom start time ("Is anything down right now?") | `state=ACTIVE` |
| 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}"` |
| 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}"` |
| Recently resolved check (only when asked) | `update_time>="{now_minus_n_hours}"` |

For example, correlating symptoms that started at 2026-10-16T14:05:00Z on
Compute Engine (attribution prefix from Usage Attribution omitted):

```bash
# MCP
list_project_events {"parent": "projects/{project_id}/locations/global",
  "filter": "state=ACTIVE OR update_time>=\"2026-10-15T14:05:00Z\"",
  "pageSize": 100}

# gcloud fallback: --filter is required here too
gcloud service-health events list --project={project_id} --location=global \
  --page-size=100 --format=json \
  --filter='state=ACTIVE OR update_time>="2026-10-15T14:05:00Z"'
```

Quote RFC 3339 timestamps (`update_time>="2026-09-01T00:00:00Z"`). Save large
responses to a temp file outside the repository rather than reading raw JSON
into context, and summarize large multi-event listings by product and location.

### Step 3: Correlate with what was observed

1.  **Product and location.** Keep incidents matching the observed product and
    location (or all active incidents on a general project check). Regions,
    zones, multi-regions (such as `us`, `europe`, `asia`), and `global` are
    distinct PSH locations, and any hierarchy between them is product-specific:
    *   Exact location named (e.g., `europe-west1` or `us-west1-a`): stay within
        that exact location for the impact verdict. If no incident matches that
        exact location, still mention active or recently closed incidents in
        proximate locations (e.g., other zones in `us-west1`, its containing
        region, or a `europe` multi-region incident) as helpful context without
        marking the project `IMPACTED`.
    *   Vague location named (e.g., "Europe" or "US"): match broadly across
        every location that fits the description.

    If an `eventImpacts` entry omits `location` (e.g., emerging or informational
    events), check `title` and `description` before ruling out a location match.
2.  **Event state.** Before checking the timeline:
    *   `detailedState` `MERGED`: consolidated into `parentEvent`, not resolved.
        Because closed (`MERGED`) events receive no further updates, follow
        `parentEvent` via `get_project_event` until reaching a root event that
        is not `MERGED`, and replace the merged events with it. Treat the root
        event as the **single source of truth** for active/closed state,
        `relevance`, impact verdict, linked `impacts`, and published
        symptoms/workarounds (never carry forward superseded child symptoms, and
        assess the root event even when its `eventImpacts` names an underlying
        service).
    *   `detailedState` `EMERGING` (Google is still investigating): an active
        incident, reported with the emerging-incident wording in Step 5.
    *   `detailedState` `FALSE_POSITIVE` or `AUTO_CLOSED`: does **not** match.
3.  **Timeline.** Pick the window, then compare the reference time with it.
    *   *Window:* when a location was named, use the `eventImpacts` entries
        matching the observed product and location. The window opens at their
        earliest `startTime`, stays open while any of them is `AFFECTED`, and
        closes at their latest `endTime` once all are `RESOLVED`, even if the
        event stays `ACTIVE` elsewhere. Otherwise, or when the matching entries
        carry no granular status, use the event's `startTime` to `endTime` (open
        while the event is `ACTIVE`).
    *   *Comparison* (`startTime` often lags symptom onset):
        *   Reference time inside the window: **matches**.
        *   Up to **4 hours before** the window opens: **matches** (note that
            symptoms preceded `startTime`).
        *   More than 4 hours before the window opens: does **not** match
            (mention only as a possible aggravating factor since `startTime`).
        *   Window closed within **1 hour before** the reference time: **recent
            close** (`INCONCLUSIVE`); state how long before the reference time
            it closed.
        *   Window closed more than 1 hour before the reference time: does
            **not** match.
4.  **Event details.** Call `get_project_event` for surviving matches and read
    the latest update's symptom and workaround (unless full history was
    requested).
5.  **Resource-level impacts (informational only).** Query
    `list_project_impacts` (or its REST/`gcloud beta` equivalent) with
    `filter` `events:"{event.name}"` for every
    surviving incident (the root event, never a `MERGED` one) and report what
    it returns, but never derive the verdict from it. Even for products with
    resource-level impact coverage, product teams can detect resource-level
    impact only for some incidents and PSH does not say which, so an empty list
    never means "not impacted".
    *   `asset.assetName` uses numeric `{project_number}`, not `{project_id}`—
        match customer-named resources by `assetType`, location, and resource
        name. If a named resource is absent while other project resources
        appear, report both facts.
6.  **Fresh state.** Re-fetch incident data from earlier turns or alert payloads
    before issuing a verdict.

### Step 4: Issue the verdict

PSH `Event.relevance` and the skill verdict are distinct, and the verdict comes
from events only: resource-level impact results (listed impacts, an empty list,
or a failed call) never change it.

1.  **`IMPACTED`** if any matching incident's `Event.relevance` is `IMPACTED`
    or `RELATED`. The verdict makes no distinction between the two; Step 5
    reports each event's `relevance`. **Never treat `RELATED` as "not impacted"
    or skip it when asked for "only impacting" incidents**: it is PSH's
    strongest signal for products without project-level or resource-level
    impact support.
2.  **`INCONCLUSIVE`** if the `events` call failed, the observed product is not
    onboarded to PSH, the project ID is missing in a headless flow, or a
    matching incident's window (Step 3) closed within 1 hour before the
    reference time. State why. A failed `impacts` call alone never makes the
    verdict `INCONCLUSIVE`.
3.  **`NO_IMPACT_IDENTIFIED`** when `events` succeeded for a PSH-covered product
    and:
    *   No incident matches, **or**
    *   Every match has a `relevance` other than `IMPACTED` or `RELATED`
        (`NOT_IMPACTED`, `PARTIALLY_RELATED`, or `UNKNOWN`).

    **Never present this as an all-clear**: incident declaration can lag
    symptoms. State this caveat and suggest checking the workload or re-checking
    PSH if symptoms persist.

### Step 5: Report

Report in concise prose for interactive and headless callers alike, with the
granular status table below (see
[Report examples](references/report-examples.md)). For multi-project checks,
give each project its own verdict and describe shared incidents once. Include in
order:

1.  **Impact verdict** (one per project; use these exact tokens, the second
    `IMPACTED` form for `EMERGING` incidents, and list every matching event ID):
    *   `Status: IMPACTED -- Project {project_id} is affected by incident {event_id} (PSH relevance {relevance}).`
    *   `Status: IMPACTED -- Project {project_id} matches emerging incident {event_id}, which Google is still investigating (PSH relevance {relevance}).`
    *   `Status: NO_IMPACT_IDENTIFIED -- No PSH incident impacting project {project_id} was identified at this time.`
    *   `Status: INCONCLUSIVE -- Impact on project {project_id} could not be determined: {reason}.`
2.  **Project ID source** (prompt, alert payload, resource name, request
    context).
3.  **Event summary** (one per matching event; every active event on a general
    project check): title, event ID, `relevance`, state, window, and how it
    correlates with observed symptoms. List incidents in proximate locations
    separately as context.
4.  **Granular status** (per event, right after its summary): a table with one
    row per `eventImpacts` entry, so the status of each product and location
    stands out (omit it when no entry carries granular status):

    | Product | Location | Status | Start | End |
    | :--- | :--- | :--- | :--- | :--- |
    | {productName} | {locationName} | {AFFECTED or RESOLVED} | {startTime} | {endTime, or "ongoing"} |
5.  **Resource-level impacts** (per event): each returned impact's
    `assetName`, `assetType`, and `description`/timestamps, or when none were
    returned:
    *   Empty `impacts` on a product with resource-level impact coverage: `"PSH
        has not listed any resource-level impacts for this incident.
        Resource-level impacts are not available for every {product} incident
        yet, so this project can still be impacted."`
    *   Empty `impacts` on a product/resource type without coverage:
        `"Resource-level impacts are not supported for
        {product_or_resource_type} yet."`
    *   Failed `impacts` call: `"Resource-level impacts could not be retrieved:
        {reason}"`, with the same failure detail as for a failed `events` call
        (never claim none were listed, and never invent resource names)
6.  **Symptoms and workarounds** (per event): quote the latest update ("No
    workaround published" if empty).
7.  **PSH links**: per event,
    `https://console.cloud.google.com/servicehealth/incidentDetails/{event_name}?project={project_id}`
    (`/` in `event.name` encoded as `%2F`); and in every report whose project ID
    is known, whatever the verdict, the events dashboard
    `https://console.cloud.google.com/servicehealth/incidents?project={project_id}`.

## References

Read each reference only when its condition applies, to keep context small:

*   [Usage Attribution](references/attribution.md): before the first command.
*   [PSH coverage: supported products and resource-level impacts](references/coverage.md):
    only when the live Supported products and locations page cannot be fetched.
*   [Errors and resolutions](references/errors.md): only after a call fails.
*   [REST API and gcloud fallback](references/rest-fallback.md): only when MCP
    is unavailable.
*   [Report examples](references/report-examples.md): when writing the report.
*   [PSH concepts](https://docs.cloud.google.com/service-health/docs/concepts.md.txt)
    and [PSH MCP reference](https://docs.cloud.google.com/service-health/docs/reference/mcp.md.txt)
references/
attribution.md 1.9 KB
# Usage Attribution

**MUST READ**: Before executing any `gcloud`, REST API, or MCP command with
this skill, follow these usage attribution instructions. Tag every command you
execute directly in the terminal so usage can be attributed. The tag identifies
only the skill and its version; it carries no user data.

-   **`gcloud` CLI Commands**: Prefix every `gcloud` invocation, whatever the
    subcommand, with the metrics environment variable. Set it inline on each
    command because shell state may not persist between commands:

    ```bash
    CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
    gcloud <command> [flags]
    ```

    Do not use `gcloud config set` for this: it would persist beyond the current
    task and mislabel unrelated usage.

-   **Direct HTTP, REST, and MCP Requests**: On direct HTTP calls to Google
    Cloud APIs (for example with `curl`) or HTTP requests to a remote MCP
    server, include
    `agent-skills/1.0 (skill:servicehealth-incident-correlation)` in the
    `User-Agent` header. If a `User-Agent` header is already specified, append
    this string to the end of it rather than overwriting existing `User-Agent`
    data — the collection pipeline parses the `agent-skills/<version>` and
    `skill:<name>` tokens, so any rewording breaks attribution:

    ```
    User-Agent: <existing_user_agent> agent-skills/1.0 (skill:servicehealth-incident-correlation)
    ```

-   **Constraint for Generated Code**: The tracking prefix is strictly for
    commands you execute directly in the terminal. Do NOT include this tracking
    prefix in generated scripts, Terraform templates, or code provided to the
    user for their own repositories.

-   **User Opt-Out**: If the user asks to disable or remove tracking or
    attribution tags, omit the `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION` variable
    and custom `User-Agent` suffix from all commands.
coverage.md 10.1 KB
# PSH coverage

PSH reports incidents only for onboarded Google Cloud products listed under
[Supported products](#supported-products) (if an observed product is absent, an
empty event list cannot rule out a Google Cloud issue and maps to
`INCONCLUSIVE`). Resource-level impacts (`v1beta` Preview) exist only for the
products and resource types in
[Resource-level impact coverage (Preview)](#resource-level-impact-coverage-preview).

## Contents

*   [Markers](#markers): Lines 22–31
*   [Resource-level impact coverage (Preview)](#resource-level-impact-coverage-preview): Lines 33–50
*   [Supported products](#supported-products): Lines 52–193

> [!NOTE]
> This is an offline snapshot of
> [Supported products and locations](https://docs.cloud.google.com/service-health/docs/supported-products-locations.md.txt).
> Fetch the live page first whenever web access is available: products,
> markers, and resource types are added over time.

## Markers

The **Markers** column under [Supported products](#supported-products)
mirrors the footnotes of the live page:

| Marker | Product supports | Effect on interpretation |
| :--- | :--- | :--- |
| `*` | Emerging incidents | Incidents can appear while Google is still investigating. Without `*`, incidents appear once confirmed, so `startTime` lags symptom onset more. |
| `†` | `IMPACTED` relevance | `IMPACTED` confirms project-level impact. Without `†` or `‡`, `RELATED` is the strongest relevance PSH gives. |
| `‡` | `IMPACTED` relevance with resource-level impacts (Preview) | Resource-level impacts can list affected resources of the types below (informational only). |

## Resource-level impact coverage (Preview)

`list_project_impacts` and `get_project_impact` (`projects.locations.impacts` in
the `v1beta` API, `gcloud beta service-health impacts`) identify individual
resources only for these products and Cloud Asset Inventory resource types:

| Product name (as shown in PSH) | Supported `asset.assetType` | Full resource name format (`asset.assetName`) |
| :--- | :--- | :--- |
| `Google Cloud SQL` | `sqladmin.googleapis.com/Instance` | `//cloudsql.googleapis.com/projects/{project_number}/instances/{instance_id}` |
| `Google Kubernetes Engine` | `container.googleapis.com/Cluster`, `container.googleapis.com/NodePool` | `//container.googleapis.com/projects/{project_number}/locations/{location}/clusters/{cluster_name}`, `//container.googleapis.com/projects/{project_number}/zones/{zone}/clusters/{cluster_name}`, `//container.googleapis.com/projects/{project_number}/locations/{location}/clusters/{cluster_name}/nodePools/{node_pool_name}` |
| `Google Cloud Pub/Sub` | `pubsub.googleapis.com/Topic`, `pubsub.googleapis.com/Subscription` | `//pubsub.googleapis.com/projects/{project_number}/topics/{topic_name}`, `//pubsub.googleapis.com/projects/{project_number}/subscriptions/{subscription_name}` |

Products and resource types absent from the table above are not supported yet.
For those in the table, `Impact` records exist only for incidents whose
resource-level impact the product team can detect, and PSH does not indicate
which incidents those are. `Impact` records are therefore informational only: an
empty `impacts` list never rules out impact and never changes the verdict.

## Supported products

**Product** lists the Google Cloud product name; **Product name (as shown in
PSH)** gives the exact, case-sensitive `eventImpacts[].product.productName`
value used in PSH events and `event_impacts.product.product_name` filters.
Combine multiple rows for a product with `OR` when pre-filtering.

| Product | Product name (as shown in PSH) | Markers |
| :--- | :--- | :--- |
| Access Context Manager | `Access Context Manager` |  |
| Agent Assist | `Agent Assist` |  |
| AlloyDB for PostgreSQL | `AlloyDB for PostgreSQL` |  |
| API Gateway | `API Gateway` |  |
| Apigee | `Apigee` |  |
| Apigee Hybrid | `Apigee Hybrid` |  |
| Application Integration | `Application Integration` |  |
| Artifact Registry | `Artifact Registry` |  |
| Backup and DR Service | `Backup and DR` |  |
| Backup for GKE | `Backup for GKE` |  |
| Bare Metal Solution | `Bare Metal` |  |
| Batch | `Batch` |  |
| BigQuery Data Transfer Service | `BigQuery Data Transfer Service` |  |
| Binary Authorization | `Binary Authorization` |  |
| Certificate Authority Service | `Certificate Authority Service` |  |
| Google Cloud Armor | `Cloud Armor` | `*` |
| Cloud Asset Inventory | `Cloud Asset Inventory` |  |
| Cloud Service Mesh | `Cloud ASM` |  |
| Cloud Billing | `Cloud Billing` |  |
| Cloud Build | `Cloud Build` |  |
| Cloud CDN | `Cloud CDN` |  |
| Cloud Data Fusion | `Cloud Data Fusion` |  |
| Cloud Domains | `Cloud Domains` |  |
| Cloud Endpoints | `Cloud Endpoints` |  |
| Cloud External Key Manager | `Cloud External Key Manager` |  |
| Filestore | `Cloud Filestore` |  |
| Firestore | `Cloud Firestore` | `†` |
| Cloud HSM | `Cloud HSM` |  |
| Cloud Intrusion Detection System | `Cloud IDS` | `*` |
| Cloud Key Management Service | `Cloud Key Management Service` |  |
| Cloud Load Balancing | `Cloud Load Balancing` | `*†` |
| Cloud Logging | `Cloud Logging` |  |
| Memorystore | `Cloud Memorystore` |  |
| Cloud Monitoring | `Cloud Monitoring` |  |
| Cloud NAT | `Cloud NAT` | `*` |
| Cloud Run | `Cloud Run` |  |
| Spanner | `Cloud Spanner` |  |
| Cloud Storage for Firebase | `Cloud Storage for Firebase` |  |
| Talent Solution | `Cloud Talent Solution - Job Search` |  |
| Cloud Trace | `Cloud Trace` |  |
| Cloud Translation | `Cloud Translation` |  |
| Cloud Vision | `Cloud Vision` |  |
| Workflows | `Cloud Workflows` |  |
| Cloud Workstations | `Cloud Workstations` |  |
| Colab Enterprise | `Colab Enterprise` |  |
| Google Cloud Contact Center as a Service | `Contact Center AI Platform` |  |
| Cloud Contact Center | `Contact Center Insights` |  |
| Container Registry | `Container Registry` |  |
| Database Migration Service | `Database Migration Service` |  |
| Dataform | `Dataform` |  |
| Knowledge Catalog | `Dataplex` |  |
| Dataproc Metastore | `Dataproc Metastore` |  |
| Datastream | `Datastream` |  |
| Developer Connect | `Developer Connect` |  |
| Dialogflow CX | `Dialogflow CX` |  |
| Dialogflow ES | `Dialogflow ES` |  |
| Document AI | `Document AI` |  |
| Eventarc | `Eventarc` |  |
| Gemini Enterprise | `Gemini Enterprise` |  |
| GKE Fleet | `GKE fleet management` |  |
| App Engine | `Google App Engine` |  |
| BigQuery | `Google BigQuery` |  |
| Bigtable | `Google Cloud Bigtable` | `†` |
| Managed Service for Apache Airflow | `Google Cloud Composer` |  |
| Google Cloud console | `Google Cloud Console` |  |
| Sensitive Data Protection | `Google Cloud Data Loss Prevention` |  |
| Dataflow | `Google Cloud Dataflow` |  |
| Managed Service for Apache Spark | `Google Cloud Dataproc` |  |
| Cloud Deploy | `Google Cloud Deploy` |  |
| Cloud DNS | `Google Cloud DNS` |  |
| Cloud Run functions | `Google Cloud Functions` |  |
| Google Cloud Managed Lustre | `Google Cloud Managed Lustre` |  |
| Google Cloud NetApp Volumes | `Google Cloud NetApp Volumes` |  |
| Pub/Sub | `Google Cloud Pub/Sub` | `‡` |
| Cloud Scheduler | `Google Cloud Scheduler` |  |
| Cloud Source Repositories | `Google Cloud Source Repositories` |  |
| Cloud SQL | `Google Cloud SQL` | `†‡` |
| Cloud Storage | `Google Cloud Storage` |  |
| Cloud Customer Care | `Google Cloud Support` |  |
| Cloud Tasks | `Google Cloud Tasks` |  |
| Google Cloud VMware Engine | `VMware Engine` |  |
| Compute Engine | `Google Compute Engine` | `†` |
| Google Kubernetes Engine | `Google Kubernetes Engine` | `‡` |
| Google Security Operations SIEM | `Google Security Operations SIEM` |  |
| Google Security Operations SOAR | `Google Security Operations SOAR` |  |
| Hybrid Connectivity | `Hybrid Connectivity` | `*` |
| Identity and Access Management | `Identity and Access Management` |  |
| Identity Platform | `Identity Platform` |  |
| Integration Connectors | `Integration Connectors` |  |
| Data Studio | `Looker Studio` |  |
| Google Cloud Managed Service for Apache Kafka | `Managed Service for Apache Kafka` |  |
| Managed Service for Microsoft Active Directory | `Managed Service for Microsoft Active Directory (AD)` |  |
| Media CDN | `Media CDN` | `*` |
| Memorystore for Memcached | `Memorystore for Memcached` |  |
| Memorystore for Redis | `Memorystore for Redis` |  |
| Memorystore for Redis Cluster | `Memorystore for Redis Cluster` |  |
| Memorystore for Valkey | `Memorystore for Valkey` |  |
| Migrate to Virtual Machines | `Migrate to Virtual Machines` |  |
| Model Armor | `Model Armor` |  |
| Network Connectivity Center | `Network Connectivity Center` | `*` |
| Network Intelligence Center | `Network Intelligence Center` | `*` |
| Network Telemetry | `Network Telemetry` |  |
| Persistent Disk | `Persistent Disk` | `*†` |
| Personalized Service Health | `Personalized Service Health` |  |
| Private Service Connect | `Private Service Connect` | `*` |
| Provisioned Throughput | `Provisioned Throughput` |  |
| reCAPTCHA | `reCAPTCHA Enterprise` |  |
| Recommender | `Recommender` |  |
| Cloud Resource Manager API | `Resource Manager API` |  |
| AI Commerce Search API | `Retail API` |  |
| Secret Manager | `Secret Manager` |  |
| Security Command Center | `Security Command Center` |  |
| Service Directory | `Service Directory` |  |
| Storage Transfer Service | `Storage Transfer Service` |  |
| Text-to-Speech | `Text-to-Speech` |  |
| Cloud Service Mesh | `Traffic Director` | `*` |
| Transcoder API | `Transcoder API` |  |
| Vertex AI Agent Engine | `Vertex AI Agent Engine` |  |
| Batch prediction | `Vertex AI Batch Prediction` |  |
| Vertex AI Feature Store | `Vertex AI Feature Store` |  |
| Vertex AI Model Monitoring | `Vertex AI Model Monitoring` |  |
| Vertex AI Model Registry | `Vertex AI Model Registry` |  |
| Online prediction | `Vertex AI Online Prediction` |  |
| Vertex AI Pipelines | `Vertex AI Pipelines` |  |
| Agent Search | `Vertex AI Search` |  |
| Vertex AI Training | `Vertex AI Training` |  |
| Vertex AI Workbench | `Vertex AI Workbench User Managed Notebooks` |  |
| Vertex AI API | `Vertex Gemini API` |  |
| Vertex AI Imagen API | `Vertex Imagen API` |  |
| Vertex AI Veo API | `Vertex Veo API` |  |
| Video Intelligence API | `Video Intelligence API` |  |
| Virtual Private Cloud (VPC) | `Virtual Private Cloud (VPC)` | `*†` |
| Web Risk | `Web Risk` |  |
errors.md 4.1 KB
# Errors and resolutions

Use this table when a PSH MCP tool call, REST request, or `gcloud` command
fails. When a failure prevents retrieving PSH **events** for a project, the
verdict for that project is `INCONCLUSIVE` with the failure as the reason;
never fall back to guessing.

| Observed signal | Cause | Resolution |
| :--- | :--- | :--- |
| `Malformed name: 'projects/{project_id}/events'` (or `/impacts`) | `parent` is missing `/locations/global` | Use `projects/{project_id}/locations/global`. |
| `Location {region} is not found or access is unauthorized.` | `parent` or `--location` names a region instead of `global` | PSH events and impacts are served only under `locations/global`. Filter by region client-side using `eventImpacts[].location.locationName` or resource paths in `asset.assetName`. |
| `Permission 'mcp.googleapis.com/tools.call' denied on resource ...` | Caller lacks `roles/mcp.toolUser` on `{project_id}`, or `{project_id}` is wrong | Confirm `{project_id}` from the prompt or alert. If correct, report `INCONCLUSIVE` (permission denied) and name `roles/mcp.toolUser` and `roles/servicehealth.viewer`. |
| `Permission denied on resource project {project_id}.` (on events) | Project does not exist, or caller lacks `roles/servicehealth.viewer` (`servicehealth.events.list`) | Confirm `{project_id}`; if correct, report `INCONCLUSIVE` (permission denied) and name `roles/servicehealth.viewer`. |
| `Permission 'servicehealth.impacts.list' denied`, `503 UNAVAILABLE`, or `404` on `impacts` (while `events` succeeded) | Custom event-only role omits `servicehealth.impacts.*`, or the `impacts` endpoint is unavailable | Never treat a failed `impacts` call as an empty list: keep the event-level verdict (`IMPACTED` or `RELATED` stays `IMPACTED`; never downgrade to `NO_IMPACT_IDENTIFIED` or switch to `INCONCLUSIVE`), report `"Resource-level impacts could not be retrieved: {reason}"` regardless of `relevance` (never claim no resources were listed), and never invent resource names. |
| `Service Health API has not been used in project ... or it is disabled` | `servicehealth.googleapis.com` is not enabled | Report `INCONCLUSIVE` (API disabled) and tell the user to enable `servicehealth.googleapis.com` (noting resource-level impacts require enablement 24h before an event starts). Do not enable it without user approval. |
| `Resource "projects/.../events/{event_id}" was not found` | Wrong `{event_id}` or wrong `{project_id}` | Take `name` verbatim from a `list_project_events` result; event IDs are scoped per project. |
| `(gcloud.service-health) Invalid choice: 'impacts'` | `impacts` is in Preview (`v1beta`) and not in the GA `gcloud` track | Use `gcloud beta service-health impacts` or the `v1beta` REST endpoint. |
| `invalid filter: unsupported filter field: "relevance"` (or `location`) on events | Field is not filterable on `events.list` | Drop it from `filter`; read `relevance` and `eventImpacts` from the results. |
| `invalid filter` on `event_impacts.product.product_name="..."` or `events="..."` | `=` used on a repeated/array field instead of `:` | Use the `:` (`HAS`) operator—for example `event_impacts.product.product_name:"Google Cloud SQL"` (exact, case-sensitive) or `events:"projects/{project_id}/locations/global/events/{event_id}"`. |
| `invalid filter: unsupported filter field` on `impacts` (for example `event`, `asset.assetType`, `updateTime`) | Wrong field name or operator on `impacts.list` | Use snake_case `events:"projects/{project_id}/locations/global/events/{event_id}"` (plural `events` with `:`), `asset.asset_name`, `asset.asset_type`, or `update_time`, or list without `filter` and match `events` client-side. |
| `unable to parse filter "update_time>=2026-..."` | Timestamp not quoted | Write `update_time>="2026-09-01T00:00:00Z"` (escape inner quotes inside JSON). |
| HTTP 429 or deadline exceeded | Rate limit or timeout | Retry once with backoff. If it fails again on events, report `INCONCLUSIVE` (rate limit or timeout). |
| Result too large to read | Many events or impacts | Narrow with `filter` and `pageSize`, or save the output to a temporary file outside the repository and extract only required fields. |
report-examples.md 5.8 KB
# Report examples

These examples show the expected shape of a report. Event IDs, projects,
project numbers (`987654321098`), and text are synthetic placeholders; real
reports must quote retrieved PSH data.

## Contents

*   [Interactive: RELATED incident on a product without resource-level impacts](#interactive-related-incident-on-a-product-without-resource-level-impacts): Lines 15–43
*   [Interactive: RELATED incident on a supported product, no resource-level impacts listed](#interactive-related-incident-on-a-supported-product-no-resource-level-impacts-listed): Lines 45–71
*   [Interactive: product not covered by PSH](#interactive-product-not-covered-by-psh): Lines 73–85
*   [Headless: impacted resources listed by PSH](#headless-impacted-resources-listed-by-psh): Lines 87–112
*   [Headless: events call failed](#headless-events-call-failed): Lines 114–126

## Interactive: RELATED incident on a product without resource-level impacts

```text
Status: IMPACTED -- Project orders-frontend-prod is affected by incident EVT1001 (PSH relevance RELATED).

Project ID source: named in your message.

Incident EVT1001: "Compute Engine: elevated packet loss in us-east1". Active
since 2026-10-16T13:52Z (detailed state: CONFIRMED). Your VM packet loss
started at 14:05Z, inside the incident window, for the same product and region.
PSH marks this incident RELATED: it affects a product in a location your project
uses.

| Product               | Location | Status   | Start  | End     |
| :-------------------- | :------- | :------- | :----- | :------ |
| Google Compute Engine | us-east1 | AFFECTED | 13:52Z | ongoing |

Resource-level impacts: Resource-level impacts are not supported for Google
Compute Engine yet.

Latest symptom (PSH update 2026-10-16T14:30Z): "Compute Engine VM instances in
us-east1 may experience intermittent packet loss and elevated network latency."
Workaround: "Shift latency-sensitive traffic to backends in another region
until mitigation completes."

Links:
- Incident: https://console.cloud.google.com/servicehealth/incidentDetails/projects%2Forders-frontend-prod%2Flocations%2Fglobal%2Fevents%2FEVT1001?project=orders-frontend-prod
- PSH dashboard: https://console.cloud.google.com/servicehealth/incidents?project=orders-frontend-prod
```

## Interactive: RELATED incident on a supported product, no resource-level impacts listed

```text
Status: IMPACTED -- Project billing-db-prod is affected by incident EVT1002 (PSH relevance RELATED).

Project ID source: named in your message.

Incident EVT1002: "Cloud SQL: elevated connection errors in us-central1". Active
since 2026-10-16T15:10Z (detailed state: CONFIRMED). Your connection errors
started at 15:30Z, inside the incident window, for the same product and region.
PSH marks this incident RELATED.

| Product          | Location    | Status   | Start  | End     |
| :--------------- | :---------- | :------- | :----- | :------ |
| Google Cloud SQL | us-central1 | AFFECTED | 15:10Z | ongoing |
| Google Cloud SQL | us-east1    | RESOLVED | 15:10Z | 15:45Z  |

Resource-level impacts: PSH has not listed any resource-level impacts for this
incident. Resource-level impacts are not available for every Google Cloud SQL
incident yet, so this project can still be impacted.

Symptoms and workaround: No workaround published.

Links:
- Incident: https://console.cloud.google.com/servicehealth/incidentDetails/projects%2Fbilling-db-prod%2Flocations%2Fglobal%2Fevents%2FEVT1002?project=billing-db-prod
- PSH dashboard: https://console.cloud.google.com/servicehealth/incidents?project=billing-db-prod
```

## Interactive: product not covered by PSH

```text
Status: INCONCLUSIVE -- Impact on project marketing-site-prod could not be determined: Firebase Hosting is not supported by Personalized Service Health.

Project ID source: named in your message.

PSH returned no incidents for this project, and Personalized Service Health
does not cover Firebase Hosting, so PSH can neither confirm nor rule out a
Google-side problem for this service.

PSH dashboard: https://console.cloud.google.com/servicehealth/incidents?project=marketing-site-prod
```

## Headless: impacted resources listed by PSH

```text
Status: IMPACTED -- Project catalog-gke-prod is affected by incident EVT1003 (PSH relevance IMPACTED).

Project ID source: alert payload (incident.resource.labels.project_id).

Incident EVT1003: "GKE: elevated control plane API latency in us-central1".
Active since 2026-10-16T14:00Z (detailed state: CONFIRMED). The alert started
at 14:05Z, inside the incident window, for the same product and region.

| Product                  | Location    | Status   | Start  | End     |
| :----------------------- | :---------- | :------- | :----- | :------ |
| Google Kubernetes Engine | us-central1 | AFFECTED | 14:00Z | ongoing |

Resource-level impacts (listed by PSH):
- //container.googleapis.com/projects/987654321098/locations/us-central1/clusters/catalog-api
  (container.googleapis.com/Cluster) -- "Cluster control plane experienced
  elevated API latency in us-central1." (recorded 2026-10-16T14:12:00Z)

Symptoms and workaround: No workaround published.

Links:
- Incident: https://console.cloud.google.com/servicehealth/incidentDetails/projects%2Fcatalog-gke-prod%2Flocations%2Fglobal%2Fevents%2FEVT1003?project=catalog-gke-prod
- PSH dashboard: https://console.cloud.google.com/servicehealth/incidents?project=catalog-gke-prod
```

## Headless: events call failed

```text
Status: INCONCLUSIVE -- Impact on project payroll-prod could not be determined: permission denied on the Personalized Service Health API.

Project ID source: named in the request.

The caller lacks roles/servicehealth.viewer on project payroll-prod, so PSH
events could not be retrieved and PSH can neither confirm nor rule out a
Google-side problem.

PSH dashboard: https://console.cloud.google.com/servicehealth/incidents?project=payroll-prod
```
rest-fallback.md 5.0 KB
# REST API and gcloud fallback

Use the Service Health REST API (`curl`) or `gcloud` when no MCP client is
connected.

*   Prefer `curl` over `gcloud ... list` on projects with large event histories:
    REST evaluates `?filter=` server-side, whereas `gcloud` evaluates `--filter`
    client-side after auto-paginating the unfiltered collection (always pass
    both `--filter=...` and `--page-size=100` on `gcloud`).
*   Follow the attribution headers and environment variables in
    `references/attribution.md`. Always pass `{project_id}` explicitly (never
    the host's default `gcloud` project).

## Contents

*   [Authentication](#authentication): Lines 21–28
*   [List events](#list-events): Lines 30–67
*   [Get one event](#get-one-event): Lines 69–80
*   [List and get resource-level impacts (`v1beta` Preview)](#list-and-get-resource-level-impacts-v1beta-preview): Lines 82–113

## Authentication

```bash
TOKEN="$(CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" gcloud auth print-access-token)"
```

With user credentials (ADC), pass `-H "x-goog-user-project: {project_id}"` on
REST if needed for quota.

## List events

Always pass a bounded `?filter=...` URL-encoded on REST (or `--filter=...` with
`--page-size=100` on `gcloud`) unless the user explicitly asks for the full
event history, so listings do not return the full historical archive.

```bash
# Active incidents (live/ongoing check without a calendar date):
curl -s \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "User-Agent: curl agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
  "https://servicehealth.googleapis.com/v1/projects/{project_id}/locations/global/events?filter=state%3DACTIVE&pageSize=100"

CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
gcloud service-health events list --project={project_id} \
  --location=global --page-size=100 --filter="state=ACTIVE" --format=json
```

When correlating a calendar timestamp, use
`state=ACTIVE OR update_time>="{reference_time_minus_24h}"`:

```bash
curl -s \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "User-Agent: curl agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
  "https://servicehealth.googleapis.com/v1/projects/{project_id}/locations/global/events?filter=state%3DACTIVE%20OR%20update_time%3E%3D%222026-10-15T09%3A40%3A00Z%22&pageSize=100"

CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
gcloud service-health events list --project={project_id} \
  --location=global --page-size=100 --format=json \
  --filter='state=ACTIVE OR update_time>="2026-10-15T09:40:00Z"'
```

*   **REST pagination & views:** follow `nextPageToken` with
    `pageToken={page_token}` and the same `filter`. Omit `view=EVENT_VIEW_FULL`
    unless full update history is needed for every listed event.
*   **`gcloud beta`:** `gcloud beta service-health events list` queries `v1beta`
    (full view: `--view=event-view-full`).

## Get one event

```bash
curl -s \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "User-Agent: curl agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
  "https://servicehealth.googleapis.com/v1/projects/{project_id}/locations/global/events/{event_id}"

CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
gcloud service-health events describe {event_id} --project={project_id} \
  --location=global --format=json
```

## List and get resource-level impacts (`v1beta` Preview)

`impacts` is served on **`v1beta`** REST and **`gcloud beta`** only (not in GA
`gcloud service-health`):

```bash
curl -s \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "User-Agent: curl agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
  "https://servicehealth.googleapis.com/v1beta/projects/{project_id}/locations/global/impacts?filter=events%3A%22projects%2F{project_id}%2Flocations%2Fglobal%2Fevents%2F{event_id}%22&pageSize=100"

curl -s \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "User-Agent: curl agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
  "https://servicehealth.googleapis.com/v1beta/projects/{project_id}/locations/global/impacts/{impact_id}"
```

```bash
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
gcloud beta service-health impacts list --project={project_id} \
  --location=global --page-size=100 \
  --filter='events:"projects/{project_id}/locations/global/events/{event_id}"' \
  --format=json

CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:servicehealth-incident-correlation)" \
gcloud beta service-health impacts describe {impact_id} --project={project_id} \
  --location=global --format=json
```

See the REST references for
[events (`v1`)](https://docs.cloud.google.com/service-health/docs/reference/rest/v1/projects.locations.events.md.txt)
and [impacts (`v1beta`)](https://docs.cloud.google.com/service-health/docs/reference/rest/v1beta/projects.locations.impacts.md.txt).

License (Apache-2.0)

View full license text
Licensed under the Apache License, Version 2.0. See https://github.com/google/skills/blob/main/LICENSE