查看 Google Cloud 服务的状态信息

zen*_*beh 0 google-cloud-platform google-cloud-functions

我想分别从所有这些服务中检查属于 Google Cloud 的服务的状态:服务运行状况 GCP。我是 GCP 的新手,想知道如何使用云功能等进行检查。有人能给我任何建议吗?

Joh*_*ley 6

我想检查服务状态...

您可以通过处理运行状况数据来确定服务的状态。这并不像看起来那么简单,因为此时没有服务运行状况的指标,只有事件的历史数据。

Google Cloud 发布了 Google Cloud Service Health 的 JSON 架构:

Google 云服务运行状况 JSON 架构

例子:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "id": "/",
  "title": "Incidents",
  "type": "array",
  "description": "Incident in the public status dashboard",
  "items": {
    ...
Run Code Online (Sandbox Code Playgroud)

您可以从此端点获取健康数据:

https://status.cloud.google.com/incidents.json

示例数据:

[
  {
    "id": "yatPQDmQ5uXqb6PzwanU",
    "number": "13941430952028707728",
    "begin": "2022-04-23T02:10:00+00:00",
    "created": "2022-04-23T16:27:43+00:00",
    "end": "2022-04-23T17:21:00+00:00",
    "modified": "2022-04-25T20:06:04+00:00",
    "external_desc": "Global: Cloud Monitoring Metrics may be unavailable or underreported for Cloud Pub/Sub",
    "updates": [
      {
        "created": "2022-04-25T20:05:32+00:00",
        "modified": "2022-04-25T20:05:32+00:00",
        "when": "2022-04-25T20:05:32+00:00",
        "text": "We apologize for the inconvenience this service ...
Run Code Online (Sandbox Code Playgroud)