youngmon/atlassian-qna huggingface dataset:
Azure alerts not mapping correctly
Asked by Rob Wetzeler:

I"m using the Common Alert Scheme (<https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-common-schema?WT.mc_id=Portal-Microsoft_Azure_Monitoring>) from Azure Alerts and have my integration setup as follows:

![Screen Shot 2021-08-26 at 8.41.44 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/157671iF83C9BBB10FC9D3F/image-size/large?v=v2&px=999 "Screen Shot 2021-08-26 at 8.41.44 AM.png")

However, I when an alert comes in, its not filling out values properly

![Screen Shot 2021-08-26 at 8.44.25 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/157672i32E72DF3030FE1F3/image-size/large?v=v2&px=999 "Screen Shot 2021-08-26 at 8.44.25 AM.png")


Answers:
author: Skyler Ataide
body: Hi there Rob,

Thanks for reaching out! This appears to be an issue with the payload that is being sent from Azure to Opsgenie. When the 'Common alert schema' option has been toggled on in Azure, this changes the format and structure of the payloads that Azure sends to Opsgenie. You can find out more details on this here: <https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-common-schema>

Are you able to try switching back to the standard alert schema for this alert type in Azure? To switch to the standard alert schema, this is a setting that needs to be made on the Azure side. You should see an option in the action/webhook definition in Azure that is sending to Opsgenie, and you can toggle the 'Enable the common alert schema' option off. For more details, see this section here: <https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-common-schema#through-the-azure-portal>

Apologies for any inconvenience that switching back to the standard alert schema in Azure may cause at this time. Since the common alert schema is currently being used and the values in the payload being sent from Azure are not being mapped over to the alert in Opsgenie, this indicates that there is a mismatch in the format. The expected incoming data format is laid out in our documentation as defined in here: <https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-microsoft-azure/>

Best regards,

Skyler

comments: author: Rob Wetzeler
body: I will turn off the common alert schema flag and see if this fixes the issue. Thanks!


author: Rob Wetzeler
body: Quick follow up, changing from using Common Alert Schema flag fixed the issue and the data mapping per the documentation is now working.


author: Skyler Ataide
body: Great to hear! Thanks for following up with this update. :smile:


Tags: cloud
escalate to last person in same timezone
Asked by Bruce Hartman:

If someone does not respond to an OPSgenie page, I want to escalate to the previous person in the same timezone.

If I am follow-the-sun for escalations.

US1 8am-8pm. India1 8pm - 8am. US2 8am - 8pm.

If US2 does not respond, I want to page US1, NOT wake up India1

Is it possible?

thx


Answers:
author: Muhammad Zeeshan
body: Hey [@Bruce Hartman](/t5/user/viewprofilepage/user-id/3613269)

What you can do is have separate schedules for US1, US2 and India1.

Then have different Escalation Policies and Routing Rules for each timeframe. So that when an alert comes in between 8am-8pm it should be Routed to the Escalation that forwards the alert to US2 schedule and then escalates it to US1 schedule if not acknowledged. It may look something like this:

![Screen Shot 2021-08-26 at 14.29.26.png](https://community.atlassian.com/t5/image/serverpage/image-id/157649iE17BDB7C319EE7D0/image-size/large?v=v2&px=999 "Screen Shot 2021-08-26 at 14.29.26.png")

comments: author: Bruce Hartman
body: In this scenario... then the US1 and US2 schedules are set up with coverage 7x24 but only paged during the specified hours?


author: Bruce Hartman
body: NM, I got my answer... thanks


Tags: cloud
Auto Slack channel creation when incident is created
Asked by Sterling Houghton:

I don't see any option via the UI or API to have a Slack channel created automatically when an incident is created. Surprised this functionally doesn't exist, or does it and it's not documented?


Answers:
author: Muhammad Zeeshan
body: Hey [@Sterling Houghton](/t5/user/viewprofilepage/user-id/4351704)

The functionality does exist for creating a Slack channel for an Incident but you can only do so manually via thee UI, that you may find to be documented here: <https://support.atlassian.com/opsgenie/docs/connect-slack-app-for-incident-management/#Creating-and-adding-Slack-channels-to-an-incident>

There is no automatic functionality as of now nor is there an API. However, we do have an internal feature request ticket for that to consider implementing this functionality in the future.

Best regards,

comments: author: David Whitlow
body: Thanks for the info [@Muhammad Zeeshan](/t5/user/viewprofilepage/user-id/2797972) - is there any way to get the same app experience you get from doing the 'create channel' into an existing channel?

For instance, if I'd already created a slack channel - can we get the opsgenie bot to show up with the same incident control panel in that channel vs having to create it from OG?


author: Anupam Dutta
body: Its sad that this is not supported.

It just adds manual process on top of person already worried about an incident.


author: ????? ?????
body: hi! Do you have an opportunity for authomatically create Slack channel for an Incident in opsgenie or only hand method? [@Sterling Houghton](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4351704)


author: Allen Barnard
body: Hi [@????? ?????](/t5/user/viewprofilepage/user-id/5574899),  

While our REST API is unable to automate the creation of Slack Channel, it is not however impossible automate the creation of a Slack Channel via Opsgenie  

Our customer's admins will need to leverage **[Opsgenie Edge Connection](https://support.atlassian.com/opsgenie/docs/learn-about-opsgenie-edge-connector/)** via an **[Action Channel](https://support.atlassian.com/opsgenie/docs/manage-actions-with-oec/)** to automatically trigger a custom script which creates the Slack Channel.  

A script however which leverages Slack API via OEC does not exist and would need to be developed by our customers, if a customer does not have the appropriate engineering resources to create such a script they can reach out to an authorized **[Atlassian Partner](https://partnerdirectory.atlassian.com/)** ,  

Documentation on how to use the **create_channel** function in the Slack API can be found here <https://api.slack.com/reference/functions/create_channel>

Please not creation of such a custom script falls outside the scope of Opsgenie Support, we can only assist in configuring and deploying OEC we cannot offer support to help create a custom script.  

Thanks and kind regards,  
Allen Barnard

Senior Support Engineer  
Atlassian Analytics \| Opsgenie \| Trello


Tags: cloud
Transferring Alerts Between Teams
Asked by Eric Sletten:

We have used OpsGenie for a couple of years on a very limited basis. Mostly individual groups using it for their own things without a lot of centralized standards. We're now expanding the use to all of IT, integrating it with ServiceNow and in general using it more as intended.

One issue that we're we're trying to head off before it happens is that when users want to add another team as a responder, or create an alert for another team, they have the option to add teams, escalations, schedules or users. Which is great, but it also opens up the possibility that they could send it to the wrong place and either have the notification missed because no routing rule exists or it could just be handled incorrectly (too aggressive / or not of a escalation policy).

How is this usually handled? Naming standards for common cross-team communication along with documentation and standards? Simply relying on educating users? Other ideas?


Answers:
author: Ronnie Kingston
body: Hello Eric,

There could be many ways to handle this scenario based on how each organization's alert handling policy is defined.

I can suggest a method to not "miss" an alert just because it was incorrectly routed or assigned.

You can go to your team's escalation policies and make the policy repeat itself even if the alert was acknowledged. The repetition happens until the alert is closed.

The on-call person can then decide whether to take action on the alert or add another team as the new responder to the alert. The newly added team can then undertake further actions to address the alert. Once the issue is addressed, they will need to close the alert.

In this way, you can avoid an alert being routed to a dead-end. I hope this helps with your requirement.

![Image 2021-08-25 at 9.52.53 am.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/157414i79E9749DC382FA29/image-size/large?v=v2&px=999 "Image 2021-08-25 at 9.52.53 am.jpg")


Tags: cloud
Reporting in Opsgenie - Incidents and Pages
Asked by Brian Fitzgerald:

Hey everyone!

I'm trying to pull some metrics from OpsGenie on the amount of incidents we had in a given time period and how many pages were sent out to teams in the same time period.

I cannot find anything out of the box, notifications is useless as it tracks every single email OpsGenie sends out.

I'm just trying to build a dashboard that tracks incidents and pages in a given period.

Is this possible?


Answers:
author: Gorka Puente _Appfire_
body: Hi [@Brian Fitzgerald](/t5/user/viewprofilepage/user-id/4525965)

It's certainly possible, you can develop a [gadget](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) for the Jira dashboard ([example](https://bitbucket.org/atlassianlabs/atlassian-connect-jira-dashboard-item-example/src/master/)) using [Opsgenie API](https://docs.opsgenie.com/docs/api-overview), and display the metrics you need.

If you're interested in a commercial solution, we provide an app called [Dashboard Hub for Jira](https://marketplace.atlassian.com/apps/1223898/dashboard-hub-for-jira-reports-charts?hosting=cloud&tab=overview) (available for Confluence too), which integrates with Opsgenie and provides gadgets like the [Open Alerts](https://help.roninpixels.com/RDD/Open-Alerts.122486938.html) or [Last Incidents](https://help.roninpixels.com/RDD/Last-Incidents.123961345.html) among others (more than 60 gadgets from 9 products like Statuspage, Insight, Opsgenie, Confluence, JSM...).

Hope this helps!


Tags: cloud
Auto-close an incident when no related alerts are active
Asked by Alessandro Pistola:

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


Answers:
author: Justin Sitarz
body: Hi Alessandro,

Justin here, from Opsgenie support - happy to help!

Unfortunately, I think the way you're doing this currently is probably one of the better options, as there is not a way to automatically close incidents out when all of the responder alerts are closed (though we do have a feature request for that - request id AG-347, for reference). And, as you mentioned, due to the asynchronous processing of requests, there may be a second or two delay between the close alert request being made and the actual alert being closed out - necessitating a small delay on your end when checking if the count of open responder alerts for your incident is zero.

The hope would be that we enable some built in functionality to address this use case - so what I can recommend is checking in with Opsgenie support (either through the in-app chat or through the Atlassian support portal) on the status of the request periodically, referencing the ID above.

Hopefully that helps to answer your question, but please do let me know if you have any others, or if there's anything else we can assist with. Thanks!

Justin S.

Opsgenie Support

comments: author: Alex John
body: Has there been progress here over in the last 2 years? Has a more elegant solution been created?


author: Chris DeGidio
body: Hi there [@Alex John](/t5/user/viewprofilepage/user-id/5081011) We have a public feature request logged for this and it is currently in the reviewing stage. This generally means Engineer ack's the desire and request for this feature and is assessing it for it to be included in a dev cycle.

You can vote and signup for notifications for future updates on this here: <https://jira.atlassian.com/browse/OPSGENIE-131>

Thanks so much!


Tags: alert

api

automation

close

cloud

count

incident
URL link to see who's on call for a specific team
Asked by William Butt:

Hello,

I'm wondering is there a way to get the URL link to view a specific team to find out who's on call?

If you aren't a member of that team, when you click on the team, it opens on the same page, however there's no direct link.

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


Answers:
author: Skyler Ataide
body: Hi William,

Thanks for reaching out! Under **Settings \>\> All schedules**, you can get direct links to the schedules in the UI. However, a user would either need to be a member of the team the schedule is for, or have admin privileges in order to view them. Hope this helps!

Best,

Skyler

comments: author: William Butt
body: It doesn't make sense that you can see the groups from the 'Whoisoncall' page without being a member but you can't grab the URL of any such group without being a member.

We do not want to add all of our folks to all of the groups... that's a maintenance nightmare.

I will accept your reply as an answer as this may be all I can get at the moment due to the limitations of the product I presume. I'm not sure if anything can be done via the API; I'm not a programmer/developer so I have no idea on that.

I would believe this would make a good enhancement request to the product.... can you pass along this information to the Product Manager for review?

Maybe create a URL to see what you can see on the 'whoisoncall' page

Thank you


author: Skyler Ataide
body: Hi William,

Thank you for your kind words and understanding. I will be happy to pass this suggested enhancement on to our product team as a feature request. :)

Best,  
Skyler


author: Gonzalo
body: there's a future request out there to get something like this added. Please vote and bring some attention to this need.   

[\[OPSGENIE-172\] Ability to export schedules](https://jira.atlassian.com/browse/OPSGENIE-172)
OpsGenie to JSM integration without an API token - feature request
Asked by Cameron Gocke:

Like many others, we use SSO to login to Atlassian. Are there any alternatives for an OpsGenie to JIRA integration that does not make use of an API token associated with a JIRA user account? This seems like bad practice and presents several challenges including:

1. If the user who generated the API token leaves and is disabled then the integrations stop working
2. The issues created in JIRA / JSM are show the user as the issue reporter and so they get notifications anytime an issue is created or updated. (suggestion so far from support is to use an automation to change the reporter, but i think that only partly solves the issue).

It seems like this should be treated like a first party app integration that uses either some form of client credentials token or something similar.

If there isn't an alternative solution for this today, how do I go about bringing attention to this in the form of a feature request or something like that?


Answers:
author: Skyler Ataide
body: Hi Cameron,

Thank you for your valuable feedback! Since your team utilizes SSO to login, you need to generate an API token and use this token as the password in the integration settings password field. Currently, there are not any alternatives for an Opsgenie to Jira integration that does not make use of an API token associated with a Jira user account in this case. If you would like, I can raise this feature request on your behalf. Hope this helps, please let me know if you have any further questions, comments, or concerns.

Thanks,

Skyler

comments: author: Cameron Gocke
body: Yes I think a feature request would be most appropriate. A user level token isn't an ideal integration method for a first party application integration like this.


author: Skyler Ataide
body: Hi Cameron,

I wanted to inform you that I have submitted a feature request for this issue. I've added your organization to the internal ticket we have. For your reference, the ticket number is OGS-4032. You can reach out to us and reference that number in the future if you're looking for updates.

Best regards,

Skyler


author: Julia Foden
body: Hi Skyler

Can I also vote for / watch this feature request please.


author: Skyler Ataide
body: Hello Julia,

Sure thing, I have added your organization to this feature request as well. The ticket number is the same as mentioned previously in this thread for your reference.

Best regards,

Skyler


author: Jeremy Wilcox
body: I would also like to have my organization added to this feature request.  

Thank you


author: Skyler Ataide
body: Hi Jeremy,

I will be happy to add your organization to this feature request. Can you please provide me with either the name of your organization or the Atlassian site that you belong to so that I can have you added?

Thanks,

Skyler


Tags: api

jira

token
Run PowerShell Core 6.x or 7.x script from Bamboo script task
Asked by Vitalii C_:

Hello, colleagues.

Is there any way to run PowerShell Core 6 or 7 from a standard Bamboo script task on a Bamboo agent that works on Windows Server 2016 LTSC (I guess same will apply to Windows Server 2019)?

I went through task documentation and I discovered that there's no mention about support for these PowerShell versions.

PowerShell 6 and 7 are more robust and have lots of improvements if we compare them with PowerShell base 5.1 (which was shipped in windows server 2016).

However, Microsoft had changed significantly a way of installation and even PowerShell.exe named differently:

* PowerShell.exe is now pwsh.exe;
* Different folders are in use for modules and profiles then for the 5.1, etc.;

<https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7.1>

It looks like it won't work by default.

So, any ideas or road maps about this?


Answers:
author: Alistair.Mackay
body: Hi [@Vitalii C_](/t5/user/viewprofilepage/user-id/4203893)   

Assuming you have done a standard installation of PowerShell Core on your build agent image, then it should work if you place your PowerShell in a script file, then using cmd.exe task, run it like so  

```
pwsh.exe -File yourscript.ps1
exit %ERRORLEVEL%
```

If using Linux build agents with PowerShell core, you can inline PowerShell script with the appropriate shebang in a shell script task  

```
#!/usr/bin/env pwsh

Get-ChildItem ...
```

comments: author: Vitalii C_
body: Hi, [@Alistair.Mackay](/t5/user/viewprofilepage/user-id/3083369)

Happy New Year and Merry Christmas.

Thanks for sharing.

But my question is not about proxy call from command task, but about ability to run inline/file PowerShell script with a **script task**.

So, again, thanks for sharing.

I have the same idea about file-based proxy call approach if I will figure out that my scenario above is not an option.

Also, I will mark you reply as "accepted", because it's covering part of the solution.


author: Alistair.Mackay
body: AFAIK there's no way currently to run inline PowerShell Core script tasks in Bamboo on Windows agents, not until Atlassian or a 3rd party provides a task plugin for it. Only with the above mechanism on Linux agents can you run inline.


Tags: bamboo-development

powershell

script
Is there a way to get Bamboo and its Plugin version?
Asked by pooja singh:

I am working on developing a Bamboo Task Plugin Module. I need to get Bamboo version and the my plugin version details when I run my Plugin. Is there any standard package or constant or class to get these information?

For example: If my plugin version is 1.0.1 according to pom.xml and I have installed it on Bamboo 7.2.1. When I run my plugin task I want to see 1.0.1 as plugin version and 7.2.1 as Bamboo version.


Answers:
author: Steffen Opel _Utoolity_
body: Welcome to the Atlassian Community!

For development focused questions, we recommend to reach out at the dedicated [Atlassian Developer Community](https://community.developer.atlassian.com/), where most app developers hang out. The [Bamboo Development](https://community.developer.atlassian.com/c/bamboo-development) category isn't very active due to only comparatively few Marketplace Partners developing apps for Bamboo, but I'll ask a colleague of mine to chime in tomorrow regarding the question at hand.
Acknowledge an alert in OpsGenie from an update in JSM
Asked by Luc Demanche:

When we open an incident in JSM, the system is creating an alert in OpsGenie using the integration between JSM and OpsGenie.

Is it possible to to automatically acknowledge the alert in OpsGenie when our agent is commenting the incident in JSM?


Answers:
author: Nick H
body: Hi [@Luc Demanche](/t5/user/viewprofilepage/user-id/4494901) ,

This should be configurable within the integration's Advanced tab. Note that this tab is only available for the Standard and Enterprise plans:

![jsmcomm1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/157217i041DFE48A7733A01/image-size/large?v=v2&px=999 "jsmcomm1.jpg")

Under the Acknowledge action, you can configure what will ack the alert automatically based on the request, what data is parsed in the payload, etc. This action's filter might look something like this:

![jsmcomm2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/157218i8D78FC844917D57C/image-size/large?v=v2&px=999 "jsmcomm2.jpg")

And for reference, this is typically what the log would look like when a comment is added to a JSM issue. In my screenshot above, I'm filtering on the Comment Author field:

![jsmcomm3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/157219iE3EFF72CA96BED36/image-size/large?v=v2&px=999 "jsmcomm3.jpg")

Hope this helps!
How to find which user stopped a job?
Asked by Todd Miller:

We have a global team with limited resources where several members have the permission to stop running jobs. Sometimes this is necessary to move branches through our gates efficiently, however it creates some communication issues if you can't figure out who is killing jobs that really should continue running.

It would be nice to be able to leverage the API to just find which user is running the "stop" command on a particular run. Does anyone know if there is a way of doing this? It doesn't seem possible at the moment.

Todd.


Answers:
author: Gonchik Tsymzhitov
body: Hi!

In the gui you can see who stopped the plan(job)