Stay organized with collections
Save and categorize content based on your preferences.
Personalized Service Health logs service health events in Cloud Logging. It
records all updates to the event's description, relevance, or state as a
distinct log.
This document explains how to view, export, and store Service Health
logs.
Select a Google Cloud project at the top of the page.
In the Log name drop-down menu, select Service Health.
A list of logs for
type.googleapis.com/google.cloud.servicehealth.logging.v1.EventLog
appears.
Expand a log entry to view the event details. The following example shows a
typical event.
"insertId":"1pw1msgf6a3zc6",
"timestamp":"2022-06-14T17:17:55.722035096Z",
"receiveTimestamp":"2022-06-14T17:17:55.722035096Z",
"logName":"projects/PROJECT_ID/logs/servicehealth.googleapis.com%2Factivity",
"resource":{
"type":"servicehealth.googleapis.com/Event",
"labels":{
"resource_container":"797731824162",
"location":"global",
"event_id":"U4AqrjwFQYi5fFBmyAX-Gg"
}
}
"labels":{
"new_event":"true"
"updated_fields": "[]"
},
"jsonPayload":{
"@type":"type.googleapis.com/google.cloud.servicehealth.logging.v1.EventLog",
"category":"INCIDENT",
"title":"We are experiencing a connectivity issue affecting Cloud SQL in us-east1, australia-southeast2.",
"description":"We are experiencing an issue with Google Cloud infrastructure components at us-east1, australia-southeast2. Our engineering team continues to investigate the issue. We apologize to all who are affected by the disruption.",
"updateTime":"2023-11-14T22:26:40Z",
"endTime":"2023-11-14T22:13:20Z",
"impactedLocations":"['us-east1','australia-southeast2']",
"impactedProducts":"['Google Cloud SQL']",
"impactedProductIds":"['hV87iK5DcEXKgWU2kDri']",
"nextUpdateTime":"2023-11-14T22:40:00Z",
"startTime":"2020-09-13T12:26:40Z",
"state":"ACTIVE",
"detailedState":"CONFIRMED",
"relevance":"RELATED",
}
Query Service Health logs
You can use Logs Explorer to query Service Health logs. You may need
the following references to build your query:
jsonPayload.impactedLocations : "us-central1" AND jsonPayload.impactedProducts : "Google Compute Engine" AND jsonPayload.state = "ACTIVE"
Export Service Health logs
You can export Service Health logs to any Cloud Logging sink
destination using the Google Cloud console, API, or the gcloud CLI.
To set up a Cloud Logging sink, see
Configure and manage sinks.
Sending Service Health-related logs from all projects under a folder to
a project created for Service Health logs lets you do more complex
queries on them.
You'll create a sink at the folder level
to send all Service Health-related logs to a new project under that
folder. Do the following:
To get logs for all relevant incidents, set the LOG_FILTER value to the following:
resource.type=servicehealth.googleapis.com/Event AND jsonPayload.category=INCIDENT AND jsonPayload.relevance!=NOT_IMPACTED AND jsonPayload.@type=type.googleapis.com/google.cloud.servicehealth.logging.v1.EventLog
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Query, export, and store Service Health logs\n\nPersonalized Service Health logs service health events in Cloud Logging. It\nrecords all updates to the event's description, relevance, or state as a\ndistinct log.\n\nThis document explains how to view, export, and store Service Health\nlogs.\n\nBefore you begin\n----------------\n\n\n[Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n1. [Enable the Service Health API](/service-health/docs/manage-access#enable-service-health-api-single-project) for the project that you want to view, export, or store logs for.\n2. Get [access to Service Health logs](/service-health/docs/manage-access#access_logs_and_configure_log_alerts).\n\nLog schema\n----------\n\nSee the\n[Log schema reference](/reference/event-logs/rpc/google.cloud.servicehealth.logging.v1)\nfor the fields you can set in your query.\n\nView Service Health logs\n------------------------\n\nTo view Service Health logs:\n\n1. Go to the Google Cloud console.\n2. Select **Operations \\\u003e Logging \\\u003e Logs Explorer**.\n3. Select a Google Cloud project at the top of the page.\n4. In the **Log name** drop-down menu, select **Service Health**.\n\n A list of logs for\n `type.googleapis.com/google.cloud.servicehealth.logging.v1.EventLog`\n appears.\n5. Expand a log entry to view the event details. The following example shows a\n typical event.\n\n \"insertId\":\"1pw1msgf6a3zc6\",\n \"timestamp\":\"2022-06-14T17:17:55.722035096Z\",\n \"receiveTimestamp\":\"2022-06-14T17:17:55.722035096Z\",\n \"logName\":\"projects/\u003cvar class=\"readonly\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/servicehealth.googleapis.com%2Factivity\",\n \"resource\":{\n \"type\":\"servicehealth.googleapis.com/Event\",\n \"labels\":{\n \"resource_container\":\"797731824162\",\n \"location\":\"global\",\n \"event_id\":\"U4AqrjwFQYi5fFBmyAX-Gg\"\n }\n }\n \"labels\":{\n \"new_event\":\"true\"\n \"updated_fields\": \"[]\"\n },\n \"jsonPayload\":{\n \"@type\":\"type.googleapis.com/google.cloud.servicehealth.logging.v1.EventLog\",\n \"category\":\"INCIDENT\",\n \"title\":\"We are experiencing a connectivity issue affecting Cloud SQL in us-east1, australia-southeast2.\",\n \"description\":\"We are experiencing an issue with Google Cloud infrastructure components at us-east1, australia-southeast2. Our engineering team continues to investigate the issue. We apologize to all who are affected by the disruption.\",\n \"updateTime\":\"2023-11-14T22:26:40Z\",\n \"endTime\":\"2023-11-14T22:13:20Z\",\n \"impactedLocations\":\"['us-east1','australia-southeast2']\",\n \"impactedProducts\":\"['Google Cloud SQL']\",\n \"impactedProductIds\":\"['hV87iK5DcEXKgWU2kDri']\",\n \"nextUpdateTime\":\"2023-11-14T22:40:00Z\",\n \"startTime\":\"2020-09-13T12:26:40Z\",\n \"state\":\"ACTIVE\",\n \"detailedState\":\"CONFIRMED\",\n \"relevance\":\"RELATED\",\n }\n\nQuery Service Health logs\n-------------------------\n\nYou can use Logs Explorer to query Service Health logs. You may need\nthe following references to build your query:\n\n- [Instructions for viewing logs in Logs Explorer](/logging/docs/view/logs-explorer-interface)\n- [Logging query language](/logging/docs/view/logging-query-language)\n\nExamples:\n\nExport Service Health logs\n--------------------------\n\nYou can export Service Health logs to any Cloud Logging sink\ndestination using the Google Cloud console, API, or the gcloud CLI.\nTo set up a Cloud Logging sink, see\n[Configure and manage sinks](/logging/docs/export/configure_export_v2).\n\nYou can include and exclude Service Health logs by configuring the\n[inclusion and exclusion filters](/logging/docs/routing/overview#exclusions)\nfor the sink.\n\nWhen setting the product or location, use the values found at\n[Google Cloud products](/service-health/docs/supported-products-locations) and\n[locations](/service-health/docs/supported-products-locations#locations).\n\nAggregate Service Health logs at a folder level\n-----------------------------------------------\n\nSending Service Health-related logs from all projects under a folder to\na project created for Service Health logs lets you do more complex\nqueries on them.\n\nYou'll create a [sink](/logging/docs/routing/overview#sinks) at the folder level\nto send all Service Health-related logs to a new project under that\nfolder. Do the following:\n\n1. [Create a new project under a folder](https://developers.google.com/workspace/guides/create-project#gcloud-cli). This project is allocated to the Service Health logs.\n\n gcloud projects create \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e --folder \u003cvar class=\"edit\" scope=\"FOLDER_ID\" translate=\"no\"\u003eFOLDER_ID\u003c/var\u003e\n\n | **Note:** Make sure to link a billing account to the project.\n2. Create an [aggregated sink](/logging/docs/export/aggregated_sinks#create_an_aggregated_sink) at the folder level for the other projects in the folder.\n\n gcloud logging sinks create \u003cvar class=\"edit\" scope=\"SINK_NAME\" translate=\"no\"\u003eSINK_NAME\u003c/var\u003e \\\n \u003cvar class=\"edit\" scope=\"SINK_DESTINATION\" translate=\"no\"\u003eSINK_DESTINATION\u003c/var\u003e --include-children \\\n --folder=\u003cvar class=\"edit\" scope=\"FOLDER_ID\" translate=\"no\"\u003eFOLDER_ID\u003c/var\u003e --log-filter=\"\u003cvar class=\"edit\" scope=\"LOG_FILTER\" translate=\"no\"\u003eLOG_FILTER\u003c/var\u003e\"\n\n To get logs for all relevant incidents, set the \u003cvar scope=\"LOG_FILTER\" translate=\"no\"\u003eLOG_FILTER\u003c/var\u003e value to the following: \n\n resource.type=servicehealth.googleapis.com/Event AND jsonPayload.category=INCIDENT AND jsonPayload.relevance!=NOT_IMPACTED AND jsonPayload.@type=type.googleapis.com/google.cloud.servicehealth.logging.v1.EventLog\n\n3. [Set permissions for the sink Service Account](/logging/docs/export/configure_export_v2#dest-auth).\n\n gcloud projects add-iam-policy-binding \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e --member=\u003cvar class=\"edit\" scope=\"SERVICE_ACCT_NAME\" translate=\"no\"\u003eSERVICE_ACCT_NAME\u003c/var\u003e --role=roles/logging.bucketWriter\n\n gcloud projects add-iam-policy-binding \u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e --member=\u003cvar class=\"edit\" scope=\"SERVICE_ACCT_NAME\" translate=\"no\"\u003eSERVICE_ACCT_NAME\u003c/var\u003e --role=roles/logging.logWriter\n\n4. (Optional) If you don't want to send the logs to the `_Default` sink,\n [create a log bucket](/logging/docs/buckets#gcloud) for\n Service Health-related logs in the project.\n\n gcloud logging buckets create \u003cvar class=\"edit\" scope=\"BUCKET_ID\" translate=\"no\"\u003eBUCKET_ID\u003c/var\u003e --location=\u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e --enable-analytics --async\n\n If you created a log bucket, create a sink to send those logs to the bucket. \n\n gcloud logging sinks create \u003cvar class=\"edit\" scope=\"SINK_NAME_BUCKET\" translate=\"no\"\u003eSINK_NAME_BUCKET\u003c/var\u003e \\\n logging.googleapis.com/projects/\u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e/buckets/\u003cvar class=\"edit\" scope=\"BUCKET_ID\" translate=\"no\"\u003eBUCKET_ID\u003c/var\u003e \\\n --project=\u003cvar class=\"edit\" scope=\"PROJECT_ID\" translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e --log-filter=\"\u003cvar class=\"edit\" scope=\"LOG_FILTER\" translate=\"no\"\u003eLOG_FILTER\u003c/var\u003e\"\n\n### Query Service Health logs with BigQuery\n\nYou can query logs sent to Cloud Logging using BigQuery by:\n\n1. Creating SQL queries.\n2. Using the BigQuery API to feed the results of the queries to external systems.\n\nDo the following:\n\n1. [Create a log bucket](/logging/docs/buckets#gcloud) in the project you\n created for Service Health logs.\n\n gcloud logging buckets create \u003cvar class=\"edit\" scope=\"BUCKET_ID\" translate=\"no\"\u003eBUCKET_ID\u003c/var\u003e --location=\u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e --enable-analytics --async\n\n2. [Enable Log Analytics](/logging/docs/buckets#upgrade-bucket).\n\n gcloud logging buckets update \u003cvar class=\"edit\" scope=\"BUCKET_ID\" translate=\"no\"\u003eBUCKET_ID\u003c/var\u003e --location=\u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e --enable-analytics --async\n\n3. [Create a new BigQuery dataset that links to the bucket with Service Health logs](/logging/docs/buckets#link-bq-dataset).\n\n gcloud logging links create \u003cvar class=\"edit\" scope=\"LINK_ID\" translate=\"no\"\u003eLINK_ID\u003c/var\u003e --bucket=\u003cvar class=\"edit\" scope=\"BUCKET_ID\" translate=\"no\"\u003eBUCKET_ID\u003c/var\u003e --location=\u003cvar class=\"edit\" scope=\"LOCATION\" translate=\"no\"\u003eLOCATION\u003c/var\u003e\n\n4. If necessary, enable the BigQuery API.\n\n gcloud services enable bigquery.googleapis.com\n\nNow you can run complex SQL queries against BigQuery, such as:\n\nRetain past events\n------------------\n\nPersonalized Service Health provides limited retention of events.\n\nIf you need to retain a record of past service health events beyond a few\nmonths, we recommended storing Service Health logs.\n\n1. [Configure Service Health logs](/service-health/docs/logs#view-service-health-logs).\n2. [Store logs in a log bucket](/logging/docs/buckets)."]]