Issues on OpsGenie to Status Page Integration
Asked by pedro.gonzalez.castro:

Hi,

I'm working in an integration between OpsGenie and Status Page. The purpose is, when certain alerts are created in OpsGenie, create an incident on the Status Page and update the affected component. Here is a summary of the items that we would like to accomplish using this integration:

* Creating/Closing an incident on the Status Page when an alert is created in OpsGenie
* Updating the related component status when the alert is created/closed
* Updating the incident status when certain actions are done in the Opsgenie alert. For example, setting the incident status as *Monitoring* when the OpsGenie alert is Acknowledged

This is how the Integration is set:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/279901i4726532DA6A917E1/image-size/large?v=v2&px=999 "image.png")

The component id tag is added properly at the creation of the OpsGenie alert.

I am having two issues:

* I am not able to set the component back to operational when the alert is closed:
  * I have tried both values in *alert is closed* row: *resolve the incident* and *resolve the incident and update the component's status according to tags*
  * The only way I've been able to revert to operational is adding manually a tag in the alert (*cmpid_\[id\]:operational*), but this is not the desired behavior.
  * **Note:** The component is properly updated when the alert is created, I am able to modify the required component to the required status.
* I am not able to modify the incident status when the OpsGenie alert is Acknowledged. ?Is there a way to add a tag when an action is done in the ticket? I am trying to add the tag *inc:monitoring* when the alert is acknowledged but I have not been able to find the way.
  * **Note:** Again, if I add the tag manually, the incident status is updated, but this is not the desired behavior.

Please let me know how can I add tags to alerts when certain actions are done. Or if there is another way to update the status page component/incident status, I'll be more than happy to follow it.

Thanks!


Answers:
author: Egor
body: Hey Pedro,

Thanks for reaching out to Atlassian Community!

I just tested the described scenario and once I close the alert in Opsgenie, it automatically closes the incident in Statuspage and sets the status of the affected component back to operational.

I noticed that in your integration you set just to close incident when an alert is closed in Opsgenie. Could you please change it to resolve the incident and update the components' statuses according to tags? This helped me to close all of the affected components, please let me know if it'll work for you.

What is related to your second question regarding acknowledging alert and adding a tag to it - I'm afraid that at the moment there's no such possibility and you will not be able to add a tag to an alert once it's acknowledged.   

There's a possible workaround using actions and global policies, please see the following article to find out how to add a specific tag to an alert once an action is made. <https://community.atlassian.com/t5/Opsgenie-questions/Adding-tag-to-alert-through-action/qaq-p/1546936>  

I hope this helps, please let me know if you have any further questions.   

Also, this is a community, so it might take some time to get a reply. In case you want to contact support, please use the following source in the future - <https://support.atlassian.com/opsgenie/>  

Best Regards,  
Egor

comments: author: pedro.gonzalez.castro
body: Hi Egor,

Thanks for your response!

Regarding updating SP component status with the *resolve the incident and update the components' statuses according to tags* option: I think I have tried it and it does not work for the component status. It closes the SP Incident but the component does not come back to the *operational* status. Could you please confirm if I need to modify (or add) the tag *cmpid_\[id\]:operational* ? Or should it work without the modification? I mean, with the tag *cmpid_\[id\]:major_outage,* for example.

Regarding the current limitation of adding a tag trought certain actions:

* Provided workaround with alert policies: What I understood from alert policies is that they are generated at the alert creation. I mean, at the alert creation OpsGenie will check if the alert has a certain action and then it will add the tag, but is not possible to add the tag later, after the alert creation.
* Do you know if this feature is planned to be added in the future?

Thanks.


author: Egor
body: Hey Pedro,   
When I tested it from my side, I did not have to set the tag in order to reverse the component state back to operational. May I ask you please to set it to "resolve the incident and update the components'" and give it a test? Please let me know the results.   

What is related to actions - sorry I was not clear. That was a workaround so that when you acknowledge an alert, you also have to do an extra step and start the action, as described in the shared article.   

I could not find any feature requests regarding above, so I went ahead and created one. Please see <https://jira.atlassian.com/browse/OPSGENIE-1669>   

Feel free to add any additional comments to it and please start watching it to get notifications about further updates.   

Please let me know if there's anything else I can help you with.

Best Regards,  
Egor


author: pedro.gonzalez.castro
body: Hi,

It would be really nice to have any kind of indication on how should I address this issue, even if it's just a current limitation so I can start working on a workaround.

Please let me know if something is not clear in the problem description, or if I should have posted it in a different place.

Sorry for the insistence, and thanks again!


Tags: integration

statuspage