Dear all,
I was wondering if there is an automatic method to close an incident when all of its alerts are closed, currently I am doing this "by hand" meaning that through the API, when an alert is being closed, I check whether or not the incident has active alerts and if it has not, I close the incident as well as the alert.
I noticed that it this way, sometimes, for example when I close 2 alerts consequently, due to the asynchronous nature of the Opsgenie API, the result of the count API call is not always consistent and I had to set a delay of 2 seconds to make it worked properly.
Is there someone that has already faced this problem and came up with a more elegant solution?
Thanks in advance,
Alessandro