查看 Google Cloud 服务的状态信息

Check status information on services of Google Cloud

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

您需要使用Creating a service-level indicator

如果您创建自定义服务,则还必须为它们创建 service-level 目标 (SLO)。自定义服务没有 pre-defined SLO。

您还可以为自动检测到的服务创建自定义 SLO,但这不太常见。

SLO 建立在衡量绩效的指标之上,用作 service-level 指标 (SLI)。对于自定义 SLO,您必须确定要在 SLI 中使用的指标。​​

SLO monitoring

自动推断或自定义定义 service-level 应用程序目标 (SLO),并在违反 SLO 时收到警报。

I want to check the status of services ...

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

Google 云为 Google 云服务运行状况发布 JSON 架构:

Google Cloud Service Health JSON Schema

示例:

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

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

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 ...