【问题标题】:Monitor HTTPS requests and responses using Google Cloud Alerts使用 Google Cloud 警报监控 HTTPS 请求和响应
【发布时间】:2022-01-12 05:46:01
【问题描述】:

我正在尝试在 Google Cloud Monitoring 中创建 uptime check 警报。 TARGETHTTPS URL。这个URL 需要一些标题和正文数据。 在"MORE TARGET OPTIONS" 下添加HEADER data。 但是Body data 应该添加到哪里呢?

请求的curl命令是这样的

curl --location --request POST 'https://<url>' \
--header 'TOKEN': 'token' \
--header 'Content-Type: application/json' \
--data-raw '[ {<test-json-data>} ]'

如何在谷歌正常运行时间检查中发送 --data-raw(正文数据)?

【问题讨论】:

  • 我们可以通过 API 将正文数据添加到 uptimecheck。在这个documentation 中,转到试试这个 API。在请求正文字段中,您可以添加不同的请求正文参数,例如 httpCheck,contentType,body。

标签: curl google-cloud-platform alerts google-cloud-monitoring


【解决方案1】:

来自Document

要针对正常运行时间检查发出 HTTP POST 请求,您必须使用 Cloud Monitoring API 创建正常运行时间检查。

UI 不允许您这样做。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多