我按照这里的说明从谷歌监控API获取我的项目中的服务列表:https://cloud.google.com/monitoring/service-monitoring/using-api#using-curl
curl --http1.1 --header "Authorization: Bearer ${ACCESS_TOKEN}" https://monitoring.googleapis.com/v3/projects/${PROJECT_ID}/services
我在我的项目中得到了appEngine和clusterIstio对象的结果,但没有得到我的云端点的结果。
这里的文档建议支持云端点:https://cloud.google.com/monitoring/service-monitoring/using-api#choosing-svcmon-api。
这里是否缺少启用端点进行监控的说明?
发布于 2020-06-09 01:05:42
您可以使用API在项目中使用几乎任何指标来创建自定义SLO。
首先,使用此调用创建一个服务:
https://cloud.google.com/monitoring/service-monitoring/using-api#service-create
然后,针对该服务创建SLO:
https://cloud.google.com/monitoring/service-monitoring/using-api#slo-create
下面是一个演练(使用App Engine服务,而不是自定义服务):
https://medium.com/google-cloud/slos-with-stackdriver-service-monitoring-62f193147b3f
https://stackoverflow.com/questions/62266030
复制相似问题