Creating an HTTP Monitor
Create an HTTP monitor in Health Checks.
The details page for the new HTTP monitor opens. Results appear after a few moments. Use the oci health-checks http-monitor create command and required parameters to create an HTTP monitor:
oci health-checks http-monitor create --compartment-id <compartment_OCID> --display-name <name> --interval-in-seconds <number> --targets <json_file_or_string>
For a complete list of parameters and values for CLI commands, see the CLI for Health Checks.
Run the CreateHttpMonitor operation to create an HTTP monitor.
Example Request and ResponseThe following example request creates an HTTP monitor to check the health of
www.example.com
usingGET
requests over HTTPS protocol every 30 seconds.POST /20180501/httpMonitors { "compartmentId":"ocid1.compartment.oc1..<unique_ID>", "displayName":"Example HTTP Monitor", "intervalInSeconds":30, "method":"GET", "port":443, "protocol":"HTTPS", "targets":["www.example.com"], "timeoutInSeconds":30 }
Following is an example
200
response for successful creation of the previously defined HTTP monitor. TheresultsUrl
field indicates the URL for retrieving results.{ "id":"ocid1.httpmonitor.OC2...<unique_ID>", "resultsUrl":"https://healthchecks.us-ashburn-1.oraclecloud.com/20180501/httpProbeResults/ocid1.httpmonitor.OC2...<unique_ID>", "compartmentId":"ocid1.compartment.oc1..<unique_ID>", "definedTags":{}, "displayName":"Example HTTP Monitor", "freeformTags":{}, "homeRegion":"us-ashburn-1", "intervalInSeconds":30, "isEnabled":true "method":"GET", "port":443, "protocol":"HTTPS", "targets":["www.example.com"], "timeCreated":"2022-11-07T16:32:05.451057Z" "timeoutInSeconds":30, "vantagePointNames":["azr-sat","goo-cbf","aws-fra"] }