Oracle 云 api 健康检查

Oracle cloud api health check

我有以下命令在 Oracle 云中创建 api 健康检查。

oci health-checks http-monitor create --compartment-id ocid1.compartment.oc1..aaaaaaaabbb5aavs3npxp6ttq525qoollwxtrjmp1vh6skthcsitfzpw4sq2rfa --display-name "keepalive-check" --interval-in-seconds 300 --method HEAD --protocol "HTTPS" --timeout-in-seconds 60 --targets "[api.abcglobal.com]" --path "/dev/user-service/warm"  --vantage-point-names '["aws-sin"]'

虽然 运行 来自云终端的此命令出现以下错误。任何帮助将不胜感激。

***Parameter 'targets' must be in JSON format.***


 - Command

**ocidevelop@cloudshell:~ (ap-hyderabad-1)$** *oci health-checks http-monitor create --compartment-id ocid1.compartment.oc1..aaaaaaaabbb5aavs3npxp6ttq525qoollwxtrjmp1vh6skthcsitfzpw4sq2rfa --display-name "keepalive-check" --interval-in-seconds 300 --method HEAD --protocol "HTTPS" --timeout-in-seconds 60 --targets "[api.abcglobal.com]" --path "/dev/user-service/warm"  --vantage-point-names '["aws-sin"]'*

**Parameter 'targets' must be in JSON format.**
For help with formatting JSON input see our documentation here: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#ManagingCLIInputandOutput

--targets是一个复杂的参数。您可以使用 https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.6.1/oci_cli_docs/cmdref/health-checks/http-monitor/create.html#cmdoption-targets

创建其骨架

请关注:

oci health-checks http-monitor 创建 --generate-param-json-input 目标 > target.json

编辑target.json

oci health-checks http-monitor 创建 --compartment-id $C --protocol "HTTPs" --display-name "test" --interval-in-seconds " 300" --目标文件://target.json