【发布时间】:2022-01-12 05:46:01
【问题描述】:
我正在尝试在 Google Cloud Monitoring 中创建 uptime check 警报。
TARGET 是 HTTPS 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