Jorge Ampuero
Jorge Ampuero

Reputation: 109

Can I get Incidents of stackdriver policy using API?

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:

Upvotes: 3

Views: 1472

Answers (2)

Aaron Sher
Aaron Sher

Reputation: 86

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

Upvotes: 2

Jofre
Jofre

Reputation: 3898

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.

Upvotes: 4

Related Questions