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?
CodePudding user response:
https://cloud.google.com/monitoring/uptime-checks#create
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.