Search code examples
curlgoogle-cloud-platformalertsgoogle-cloud-monitoring

Monitor HTTPS requests and responses using Google Cloud Alerts


I am trying to create an uptime check alert in Google Cloud Monitoring. The TARGET is an HTTPS URL. This URL requires some headers and body data. The HEADER data is added under "MORE TARGET OPTIONS". But where would the Body data be added?

The curl command for the request is like

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

How can I send the --data-raw (body data) in google uptime check?


Solution

  • From this Document:

    To issue an HTTP POST request for an uptime check, you must create the uptime check by using the Cloud Monitoring API.

    The UI won't let you do this.