Can I get Incidents of stackdriver policy using API?

风格不统一 提交于 2021-02-10 07:54:34

问题


I was looking on stackdriver dashboard and I found the following http request:

https://app.google.stackdriver.com/api/alerting/violation?project={project-id}&page=0&pageSize=8&policyId={policy-id}

But I didn't found any docs about this D:


回答1:


The alerting methods for Stackdriver Monitoring appear in the the Google Cloud Platform documentation.

There does not seem to be an endpoint to list triggered alerts at the moment.

The best option for now would be to add a webhook as a notification channel and store the data in whatever way is easier for you to recover later.




回答2:


Confirmed, there is currently no public API for retrieving incidents. Jofre's suggestion is a good one for now. I'd note that we're working on a new incident response tool (https://cloud.google.com/blog/products/management-tools/building-a-more-reliable-infrastructure-with-new-stackdriver-tools-and-partners) which may satisfy some of your use cases once it's fully released.

Aaron Sher, Stackdriver engineer



来源:https://stackoverflow.com/questions/51623019/can-i-get-incidents-of-stackdriver-policy-using-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!