youngmon/atlassian-qna huggingface dataset:
Can a action be added to an incident created with rules?
Asked by Jorge Gomez Rivas:

Hi there,

While I can add actions when I create an incident manually. It seems that I cannot configure the incident rules to add an action that must be added to the incident created automatically.

I can add the action to the responder alert associated with the incident (incident-alert-type = Owner) but the action does not appear in the incident dropdown.

**Any idea how can a custom action can be added to an incident created with rules?**

Actions can be added when an incident is created manually:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/144887i818E4C8D5535AAF1/image-dimensions/508x456?v=v2 "image.png")

There is no option to add actions to incident rules.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/144888i7E700856EA71CB3D/image-dimensions/504x454?v=v2 "image.png")


Answers:
author: Nick H
body: Hi [@Jorge Gomez Rivas](/t5/user/viewprofilepage/user-id/1216853) ,

It's unfortunately not possible to add an action to an incident rule like you can when creating an incident manually. But we have an open feature request for this I've added you to. That ticket for reference is OGS-2058; *Request to add Actions field to Incident rule*.

Since our tickets are not public, we'll reach out directly if/when there are any updates on this. Let us know if you have any other questions, issues, etc.

-Nick

comments: author: Jorge Gomez Rivas
body: Great, thank you [@Nick H](/t5/user/viewprofilepage/user-id/2540930)


Tags: cloud

incident
How to add maintenace for team policy via API
Asked by Matt Browne:

I have a policy created for a team, but I cannot add a maintenance window to enable this policy as I can for global policies, using this API: <https://docs.opsgenie.com/docs/maintenance-api>

I always get the response that the policy cannot be found even though I've just looked up the policy using the /v2/policies/alert?teamId=\<team guid\> endpoint.

Is this possible to achieve through the API, I can do it via the UI


Answers:
author: Nick H
body: Hi [@Matt Browne](/t5/user/viewprofilepage/user-id/4136073) ,

Yes this should be possible, but you probably want to use the API key on an API integration assigned to this same team.

Try this, and let us know whether or not that works!


Tags: api

rest-api
OEC (Windows Service) action with PowerShell - how do I see (grab) the alert parameters or payload?
Asked by tolkien_leung:

Can someone provide an example of the OEC json configuration and the powershell method to capture the globalargs passed?


Answers:
author: Connor Eyles
body: Hi [@tolkien_leung](/t5/user/viewprofilepage/user-id/4373744)

Here are some instructions on how to handle OEC payload in Powershell:

The environment this was tested in is Windows 2012 and above... Powershell 3 and above.

Starting at linerps 1 of your PowerShell script you should define the parameters that PowerShell is expected to receive from OEC, these are payload, apiKey, opsgenieUrl, and logLevel.

**param(\[string\]$payload,**   
**\[string\]$apiKey,**   
**\[string\]$opsgenieUrl,**   
**\[string\]$logLevel)**

Once the parameters have been defined you need to convert the payload from JSON to a Powershell object.

**$payloadPsObj = $payload \| ConvertFrom-Json**

Now you can call your data like this, to get the payload data you can use $payloadPsObj.\<Namespace or array index\>, for example, the below will get you the alertId from the payload:

**$alertDetails = $payloadPsObj.alert**   
**$alertId = $alertDetails.alertId**

**echo $alertId**

The full final script should look like this:

**param(\[string\]$payload,**   
**\[string\]$apiKey,**   
**\[string\]$opsgenieUrl,**   
**\[string\]$logLevel)**   

**$payloadPsObj = $payload \| ConvertFrom-Json**

**$alertDetails = $payloadPsObj.alert**   
**$alertId = $alertDetails.alertId**

**echo $alertId**

Thanks,

Connor


Tags: cloud
Add impacted service to an incident using the API
Asked by Javier Diaz Martin:

Hello,

There is a use case where it is possible to add impacted services through the UI but not from the API (<https://docs.opsgenie.com/docs/incident-api>), this is something that would help automate the grouping and the general handling of incidents.

Is it possible to do it automatically apart from Incident rules?

Are any plans to add this in the future?

Thank you!


Answers:
author: Nick H
body: Hi [@Javier Diaz Martin](/t5/user/viewprofilepage/user-id/1274873) ,

It's unfortunately not possible to add / update the impacted services via the API, but we have an open feature request for this I've added you to. That ticket for reference is OGS-1821; *Incident API - Availability for updating impactedServices*.

Since our tickets are not public, we'll reach out directly if/when there are any updates on this. As for a workaround - which I'm aware is not really the best - you could use the Add Responder API to add those who would be impacted by the incident: <https://docs.opsgenie.com/docs/incident-api#add-responder-to-incident>

comments: author: Nick H
body: Otherwise - the impacted service(s) would need to updated manually within the Opsgenie app.


author: Javier Diaz Martin
body: Thank you, Nick.

I'm looking forward to this change, another great addition to the Incident API is to be able to associate alerts.


author: Raphael Benedeti
body: Hi [@Nick H](/t5/user/viewprofilepage/user-id/2540930) , is it possibile provide me the estimate date to launch the new version with this feature?


Tags: cloud
Opsgenie does not receive the dynatrace RESOLVED status
Asked by serge calderara:

Dear all,

We have setup in a test cloud the opsgenie integration with dynatrace.  
We have use for that Dynatrace Webhook

Once the dynatrace integration has been done, we have configured it to accept all alert first in order to see that all are coming in opsgenie.

We notice 2 scenarios :

**Case 1** : Alias default mapping to Dynatrace PID

=\> with this maping opgenie is actually creating an Alert on Dynatrace OPEN and RESOLVED problem ( so one alert for each status)

This is not what we want of course, so we change teh Alias mapping to match scenario 2

**Case 2** : Alias default mapp to Dynatrace ProblemID

=\> alert is created in opgenie on dynatrace OPEN status problem

=\> alert is updated ( last update field change) in opgenie on dynatrace RESOLVED status problem BUT the alert is not closed by opsgenie

Any idea what could be wrong ?

regards


Answers:
author: serge calderara
body: Problem solved it was a mismatch mapping field
Create Incident when Alert count exceed a certain value
Asked by serge calderara:

Dear all,

We are trying to create different incident scenario in opsgenie but we could not get trough

**Case 1 :**

When an alert counts in opsgenie \> #3, we would like to automatically create an Incident in Opgenie  
By looking at incident rules, we count not find a way to set a condition based on COUNT value

Any idea how to do case 1 ?

**Case 2 :**

When an alert counts in opsgenie \> #3, we would like to automatically create an Incident in Jira Service Management  
Where to define this rules ?

Thanks for help

regards


Answers:
author: Nick H
body: Hi [@serge calderara](/t5/user/viewprofilepage/user-id/3385932) ,

Neither of those are possible at this time.

There isn't a way to delay incident creation after X-deduplication count. And there isn't a way to delay outbound actions like create an issue in JSM after X-deduplication count.

We do have some feature requests though that I've added you to. For reference:

AG-348; *Ability to Trigger Incident Based on Alert De-Duplication Threshold*

HEIMDALL-3114; *Ability to delay outgoing integration actions based on de-duplication count*

Since our tickets are not public, we'll reach out directly if/when there are any developments on these.

comments: author: serge calderara
body: Dear [@Nick H](/t5/user/viewprofilepage/user-id/2540930) , thanks for your reply.

Well note.

If we take abstraction of duplicate count, is there a way to create a Jira Service Management incident issue when an Opsgenie incident is created ?

The idea is that we would like to work on the incident from Jira Service management instead of Opsgenie because in Opsgenie, you cannot add comments on the progress of the resolution.

Thanks for advise

regarsd


author: Fernandez_ David
body: Hi [@Nick H](/t5/user/viewprofilepage/user-id/2540930) ,

Any news on this features ?

I'm interessted in the creation of an incident in OpsGenie based on alerts count
Is there a way to aggregate tags coming from duplicate alerts ?
Asked by Elad Nagar:

Hi,

I am trying to integrate Opsgeine with StatusPage.

i am trying to find a way to update multiple components in the same statuspage incident. instead of opening a new incident for each component.

in order to aggregate different alerts in opsgeine, i am using opsgeine incident feature -\> which creates a responder alert in opsgeine, and i am using that responder alerts to create the incident in statuspage.

in order to update the status of the components, i am using the alerts tags, which are passed to the opsgeiene incident and then to the responder alert -\> which created the status page incident.

the problem i am facing is, that alerts tags are not aggregated in the opsgeine incident. and the only tags i have are the one from the first alert.

is there a way to configure opsgeine, to add new tags to the incident ?

appreciate any help or direction for this issue.

Thanks in advance


Answers:
author: Jorge Gomez Rivas
body: Hi Elad,

We are facing the same problem. The only way we found to aggregate information from the associated alerts to the owner alert (the one created automatically by the incident) is via webhooks and API. We develop a custom piece of software to receive the webhooks with the creation events and modify the owner alert using the API.

Best regards,

Jorge.

comments: author: Elad Nagar
body: Hi Jorge,

Thanks for your answer,

I tried contacting Atlassian but they said it's not supported.

so I am, having a hard time understand how can OPSG can be integrated with StatusPage giving they both belong to Atlassian

is this code available to be shared?

Elad


author: Jorge Gomez Rivas
body: Hi Elad,

I can't share the code because it is too custom and there is a lot of logic from the company. But I can share the documentation that we used:

* You can handle the creation webhook with.
  * a webhooks integration: [https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-webhook/,](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-webhook/)
  * and checking "Create" webhook: [https://support.atlassian.com/opsgenie/docs/opsgenie-edge-connector-alert-action-data/#Create,](https://support.atlassian.com/opsgenie/docs/opsgenie-edge-connector-alert-action-data/#Create)
* and add the tag to the owner alert: [https://docs.opsgenie.com/docs/alert-api#add-tags-to-alert.](https://docs.opsgenie.com/docs/alert-api#add-tags-to-alert)

Hope it helps!

Jorge.


Tags: cloud

component

incident

label

statuspage
Opsgenie Incident
Asked by Zaid Darras:

Hello,  

For these features in Incident:

1. Automatically create an incident with incident rules
2. Create an incident template
3. Associate an alert with an incident

Does need all users to be in the Enterprise plan or we can make one of the users on the Enterprise and the others in the Essential plan?  

<br />

Thanks,  
Zaid Darras


Answers:
author: Nick H
body: Hi [@Zaid Darras](/t5/user/viewprofilepage/user-id/3823180) ,

Opsgenie plans cannot be split - so you cannot have some users on the Essentials plan, and others on the Enterprise plan. The plan will apply to all users in your account / subscription.

Incident rule features are only available on Enterprise plan as well. So you'd want to subscribe to this plan if incident rules were needed.

<https://support.atlassian.com/opsgenie/docs/automatically-create-an-incident-via-incident-rules/>

Let us know if you have any additional questions.

-Nick

comments: author: Zaid Darras
body: [@Nick H](/t5/user/viewprofilepage/user-id/2540930) Thanks for your help!


Tags: cloud
Zabbix alerts are not acknowledged through OpsGenie Edge Connector (oec)
Asked by Belliveau_ John:

We have installed the OpsGenie WebHook integration with Zabbix, and the OpsGenie Edge Connector.

With this, Zabbix sends alerts to OpsGenie as it should, however alerts acknowledged in OpsGenie are not acknowled in Zabbix. In looking at the Activity Log for the alert in OpsGenie, I can see that the error seems to be originating from the actionExecutorForZabbix4.py script:

"/home/opsgenie/oec/scripts/actionExecutorForZabbix4.py", line 138, in \<module\> main() File "/home/opsgenie/oec/scripts/actionExecutorForZabbix4.py", line 109, in main "eventids": alert_response.json()\['data'\]\['details'\]\['eventId'\], KeyError: 'eventId'

I have opened a support case with Atlassian. Has anyone encountered/resolved this issue?


Answers:
author: Justin Sitarz
body: Hi John!

This is Justin, the engineer who worked on the original support ticket you opened - I just wanted to add an answer here, in case anyone else runs into a similar issue.

The root problem here was due to a mixing of Opsgenie's provided integration and Zabbix' native Opsgenie notification method, outlined here:

<https://www.zabbix.com/integrations/opsgenie>

To use Opsgenie with OEC (which is required for full bi-directional communication), you'll want to be sure to use the notification method described here:

<https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-zabbix-plugin/#Opsgenie-Plugin-Configuration-in-Zabbix--for-Zabbix-version-3.2-and-above->

which triggers a script that sends to Opsgenie's Zabbix integration endpoint, and importantly includes the required 'eventId' property, which is used for the OEC integration. When using Zabbix' webhook notification method, the 'eventId' property is not included, thus breaking some of the functionality that allows us to make updates \*back\* to the source alert in Zabbix.

In the case here, once we added the notification action and command to use the provided script to send to Opsgenie, the full bi-directional flow did begin to work as expected.

Having said that, if you (or anyone else) runs into a similar issue, please let me know!

Best,

Justin

comments: author: antonio.martinperez
body: Hi Justin,

I have my Zabbix configure the same way as the link that you mentioned in the previous comment. It means using the "Opsgenie Zabbix plugin".

I am able to send the alerts from Zabbix toward Opsgenie but if I try to ack the alert from Opsgenie it doesn't acknowledge the alert in Zabbix.

Could you please give me some steps to troubleshoot and be able to find the issue?

Thanks in advance,

Antonio


Tags: zabbix
Disable notification upon priority increase
Asked by Carsten H?usler:

For an open incident when the priority is increased (e.g. from P3 to P1), the responder alert will restart. In the logs of the responder alert you see this message:  
*"Alert priority has been updated to P1 via system (Previous priority was P3). Will stop ongoing escalations and notification rule steps, and restart the notification flow as if the alert is newly created now."*

For our use case, if the alert is acknowledged once when it was in P3 is enough. For the person handling the incident it is annoying to get a call for every priority increase.

**Is there any way to turn this off or have a workaround for it?**   

I was checking the policy section and it doesn't really help. The only way I see so far is to supress notifications of P1 or P2 alerts. But that's obviously far from ideal. Any ideas?  

Thanks for the help!


Answers:
author: Justin Sitarz
body: Hi Carsten!

It's not possible (at this time) to disable the reevaluation of the various aspects of the notification flow when the priority is increased - this is the default behavior, and there's not a way to turn it off.

In general, upgrading the priority is usually recommended when the alert itself needs to behave in a different way - to use a different escalation, or to notify different team members in a different schedule. If the alert is intended to continue to be responded to by the same user, and has already been acknowledged by that user, we would recommend not upgrading the priority at all.

I have, however, entered in an internal feature request for this - the reference id for that request is: OGS-3717. I can't guarantee that this is something that we will be adding to the product, but I've added your feedback to the request's notes, and our product team will evaluate it.

Hopefully that helps to answer your questions, but please let me know if there's anything else I can assist with. Thanks!

Justin

comments: author: Carsten H?usler
body: Hello Justin,  

thanks for you answer.  

My question was really in regards to the responder alerts, not alerts in general. In our case, we create incidents automatically depending on other alerts that are coming in.  
Then, there is one person managing the incident and it is kind of annoying that with every priority upgrade he/she gets another notification/call.  

Thanks for filing the feature request!

KR Carsten


Tags: cloud

priority
Opsgenie Alerts and Incidents
Asked by Zaid Darras:

Hello,  

I need to know how to use the following:  

- Alerts

- Incidents  

What the difference between them?  

Thanks,

Zaid Darras

Systems Administrator


Answers:
author: Nick H
body: Hi [@Zaid Darras](/t5/user/viewprofilepage/user-id/3823180) ,

"**Incidents** are special types of Opsgenie **Alerts** indicative of a high-priority service interruption. **Incidents** notify the people who need to know what is happening; they also help organizations automate, manage, and track information and communications related to outages and similar problems that can impact infrastructure."

\^ Taken from our Incident doc: <https://support.atlassian.com/opsgenie/docs/what-is-an-incident/>

Hope this helps! Let us know if you have any additional questions, issues, etc.

-Nick

comments: author: Zaid Darras
body: [@Nick H](/t5/user/viewprofilepage/user-id/2540930)   

Yes, this help.  

Thanks for your help!


Tags: alert

cloud

incident
Capture Email Importance and translate to Priority
Asked by Eric Sletten:

Is there a way, and how would I capture the importance of an email and assign an alert priority to it.

We've routed emails coming to a team mailing list to an OpsGenie email integration so that we capture when someone makes a request or reports an issue it's captured. Working towards the goal of our OpsGenie alert queue being the holder of all "issues" we're working on.

If someone sends an email with the importance of "high" that's part of the incoming data headers but I'd like to create an action filter based on that and don't see a way to do it.

This is an example of the incoming data - I want to filter on "IMPORTANCE": "high"

"_headers": {  
"MESSAGE-ID": "\<XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\>",  
"ACCEPT-LANGUAGE": "en-US",  
"IMPORTANCE": "high",  
"DKIM-SIGNATURE": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=XXXX.com; h=from : to : subject :\\r\\n date : message-id : content-type : mime-version; s=PPS12042020;\\r\\n bh=byGU3yumHR5BXM6XEDfjF9EUFPfGOygeCeCeMVgRCZ0=;\\r\\n b=U3inql5+jFtPZBlnJRp8jvctNE3b4Qdte7OJet64xWj2edIwyM+rRsalu9YLZEhD+kOk\\r\\n PO641skAcY2Pt71x6sa5D2SbBdgSDu5xRfbm75nwYb9rXJinQ/qfvR9C2pc1AUbtydJp\\r\\n eyUWddokKxWdRApPklNJHzNKlx5df3fY0enMWiGVIyXLtn2Gj0pOwTt7qDIgzJ8/Cd0k\\r\\n hJpnbiQhPG6K7UbkLk7P1XU+Ev275oNFeK0ZjZQ5jMrGIndXC8kleEtjjskIgxJ15k3K\\r\\n m8WhivGNRkejGfYsdVdU9j6wQ+xoI6bcuSqH7DatxJQruZlzwItiJERz/euDXCn5fsNS xw== ",  
"FROM": "\\"XXXXXXX, XXXX X.\\" \<XXXXXXXXXXXXXXX@XXXX.com\>",  
"X-PRIORITY": "5",  
"RECEIVED": "from XXXXXXXXXXXXXXXXXX.com (\[xxx.xxx.8.117\]) by\\r\\n xxxxxxxxxx.com (\[xxx.xxx.8.117\]) with mapi id\\r\\n 15.00.1497.015; Thu, 20 May 2021 10:04:00 -0500",  
"DATE": "Thu, 20 May 2021 15:03:59 +0000",  
"CONTENT-LANGUAGE": "en-US",  
"X-MS-TNEF-CORRELATOR": "",  
"THREAD-INDEX": "AddNiVyy+0llyWGSSMiIPssoIK9VPA==",  
"X-MS-EXCHANGE-TRANSPORT-FROMENTITYHEADER": "Hosted",  
"X-ORIGINATING-IP": "\[xxx.xxx.x.x\]",  
"CONTENT-TYPE": "multipart/alternative;\\r\\n\\tboundary=\\"_000_15a35d6d79f3405fabe526244568b7a9EX13OWTSRV4feddomadfedi_\\"",  
"SUBJECT": "Message Test #3",  
"TO": "xxxx@xxxx.opsgenie.net",  
"THREAD-TOPIC": "Message Test #3",  
"X-MS-HAS-ATTACH": "",  
"MIME-VERSION": "1.0",  
"X-TM-AS-GCONF": "00"  
},


Answers:
author: Nick H
body: Hi [@Eric Sletten](/t5/user/viewprofilepage/user-id/3473175) ,

You should be able to use a dynamic field to extract that. I believe what you need is:

{{_headers.IMPORTANCE}}

I'd also assume that might be parsed somewhere in the email - so you could consider using string processing or regex to extract this / other pieces of data:

<https://support.atlassian.com/opsgenie/docs/string-processing-methods-in-opsgenie-integrations/>

<https://support.atlassian.com/opsgenie/docs/regular-expressions-for-improved-alert-filtering/>

Hope this helps! Let us know whether or not that works, if you run into other questions, etc.


Tags: cloud
How do I have my bamboo plan quit when there is a failure in compiling?
Asked by Sally S_ Miller:

I have Bamboo 6.11 and I have a task that is gmake compile. If there is a problem,

it does not quit the plan it just continues to the next task which is to compile the java code and fails all the tests.

I would like it to quit so I don't have to wait the 20mins to see that it did not compile.

This would help keep our bamboo queue cleaner.


Answers:
author: Cristiano Mariano
body: Hi [@Sally S_ Miller](/t5/user/viewprofilepage/user-id/1145774) ! How are you doing?

Are you using a "Script" task?

We usually check the errorlevel after the compiler call and, in case it is not zero, we call "exit 1".

Hope this helps!
How can I trigger a Bamboo build when a Bitbucket pull request is created?
Asked by Clay K:

I am trying to set up pull request decoration on my Bitbucket server with SonarQube, but in order for it to work properly, a build on Bamboo needs to be started when the pull request is created.

From what I've been able to find, the only way to get a build to trigger when a pull request is created is to use the "Create plan branch setting" in Bamboo, which allows a new branch plan to be created and built when a pull request is created. However, I need my plan to be set to create a new branch plan when a new branch in the repository is created, and I cannot select both options.

Is there any other way that I can get Bitbucket Server to trigger a Bamboo build when a pull request is created?

![BambooBranchSetting.png](/t5/image/serverpage/image-id/114629i18244BE9F53AB4BC/image-size/large?v=v2&px=999 "BambooBranchSetting.png")


Answers:
author: Sean Conlon
body: I have the exact same problem. Anyone ever get any answers on this front?


Tags: bitbucket-server

pull-request