youngmon/atlassian-qna huggingface dataset:
How to get list of all alerts that were acknowledged by a user (given multiple acknowledgements)?
Asked by Jack Ford:

Using the [OpsGenie REST API](https://docs.opsgenie.com/docs/alert-api#list-alerts), how can I get a list of alerts acknowledged by a user (regardless of whether or not they were first to acknowledge it)? Currently, the 'acknowledgedBy' query param field doesn't seem to keep track of all users that acknowledged an alert. Instead, it only keeps track of one (it seems like whoever is the first to acknowledge it, but I'm not sure).

Consider the following example: User A acknowledges alert X, and then a few hours later our on-call schedule shift changes, so then alert X is unassigned from User A and it is alerted to User B, at which point User B acknowledges it.

I want to be able to individually query all of the alerts acknowledged by each of these users (A and B) via API and have the above example alert X show up in the list of acknowledged alerts for both User A and User B since each of them acknowledged this alert (regardless of whether or not they closed it- acknowledgement is all that matters to me in this case).

In the context of the above example, I have tried using the following query param (assuming User B's email is userB@mail.com):

```
acknowledgedBy = "userB@mail.com"
```

But this does not necessarily return alert X in the results as multiple acknowledgements don't seem to be tracked per alert, as mentioned above in my problem statement.

The recipient and owner fields also do not seem to help here since they are just singular strings too, as documented [here](https://support.atlassian.com/opsgenie/docs/search-queries-for-alerts/).

I have searched through lots of documentation and community posts and cannot find a solution for this use case issue. How can this desired result be achieved with the API?


Answers:
author: Arumugam M
body: Hey [@Jack Ford](/t5/user/viewprofilepage/user-id/5349894)

Thank you for posing your question. I'm Arumugam from Atlassian Support and happy to help.

I understand you'd like to compile a list of all alerts acknowledged by a user, even if the action was subsequently reversed.

Regrettably, it's not possible to query these values using the List API, as only the most recent values can be used as a search parameter.

In this scenario, you might want to use the [List API](https://docs.opsgenie.com/docs/alert-api#list-alerts) to gather a list of acknowledged alerts, and then use the [Activity Log](https://docs.opsgenie.com/docs/alert-api-continued#list-alert-logs) endpoint to capture all events linked to those alerts.

If an alert was acknowledged and then reverted back to open status, you can use the logs API to record all related events. You can then compile or save user and alert IDs or other information for further analysis.

Here is a screenshot for your reference:

![2023-10-27_18-29-58.png](https://community.atlassian.com/t5/image/serverpage/image-id/288798iA27890C0987B1EE8/image-size/large?v=v2&px=999 "2023-10-27_18-29-58.png")

I hope this helps. Please let me know if you have any other questions.

Thanks,

Arumugam


Tags: api

cloud

rest-api
OpsGenie Conditional alert silence
Asked by ???? ????????:

Good day!   

We use Zabbix and Prometheus for monitoring. They are sending alerts to opsgenie and those alerts are routed to different Teams channels. So I was wondering can we silence alerts from different sources based on conditions (like name, tag etc.) in opsgenie.  

E.g. Some server goes down - we receive Zabbix alert that it is indeed down and then Prometheus alerts that some services dependent on this server are failing. So the idea is to mute Prometheus alerts based on the condition that we already received alert from Zabbix. At this point it doesn't matter whether we receive them as alerts in ALERTS list, just not sending notification will do. Much like alert inhibition in Prometheus.  

Thank you!


Answers:
author: John M
body: Hi [@???? ????????](/t5/user/viewprofilepage/user-id/5349212) ,

You can silence alert notifications based on tags and other alert attributes using team-based [notification policies.](https://support.atlassian.com/opsgenie/docs/create-and-manage-team-alert-policies/#Notification-Policy)

The alerts must be assigned to the team where the policies are configured for notification policies to be applied.

Keep in mind, this would only work if you could configure some way for only the alerts that you didn't want to notify to have those tags. There is no way to have conditions based on an existing alert.

So, for example, you wouldn't be able to check your open alerts to see if an open Zabbix alert exists before deciding whether to silence a Prometheus alert whose service is dependent on that Zabbix server.

comments: author: ???? ????????
body: Got it. Thank you very much.
"We need to associate a number from Saudi Arabia for on-call"
Asked by Jen:

Hello Team,

Can we add Saudi-Arabia under the list of Supported countries for the phone numbers in Opsgenie? One of our customers want to associate a number from Saudi Arabia and they couldn't.

Thanks,

Jen A


Answers:
author: Jen
body: Hello [@Dave Mathijs](/t5/user/viewprofilepage/user-id/2662590)

I'm sorry I was referring to Incoming call routing and not SMS if that helps.

Thanks,  
Jen A.


author: Dave Mathijs
body: Hi [@Jen](/t5/user/viewprofilepage/user-id/5349462)

I see Saudi Arabia in the list of countries that support voice notifications only after the end of the trial period, see [Supported countries for sending SMS and voice calls](https://support.atlassian.com/opsgenie/docs/supported-countries-for-sending-sms-and-voice-calls/).

comments: author: Jen
body: Hello [@Dave Mathijs](/t5/user/viewprofilepage/user-id/2662590) ,

Thank you for your response. The customer is not on Trial and they do not have the option to Set a a phone number from Saudi Arabia.

Here: <https://support.atlassian.com/opsgenie/docs/incoming-call-routing/#Supported-countries-for-the-phone-numbers>

Our Support team also confirmed that this country is not added on the list and asked me to raise a ticket here.

Thanks,  
Jen A.


author: Dave Mathijs
body: Sorry to hear that Jen. In case you're on a paid plan, I suggest to submit a support request with Atlassian directly as I don't really know what could be the cause of this issue.


Tags: cloud
Authentication problem when linking JIRA issues in OpsGenie Incident
Asked by Murali Veeraiyan:

I'm getting "Authentication failed" error when trying to link JIRA software issues or JIRA service management requests to an OpsGenie incident

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


Answers:
author: John M
body: Hi [@Murali Veeraiyan](/t5/user/viewprofilepage/user-id/5348322) ,

It sounds like a user access issue. Are you able to access the linked Jira instance by logging in directly?

comments: author: Murali Veeraiyan
body: Yes, I can.

Also other admin users also facing same issue. So not specific to my user access permissions?


author: John M
body: Have you already made a connection to your Jira [using the integration](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira-software-cloud/)? Was this working previously?
Unable to access Bamboo 5.14 instance on Windows Server 2012 R2
Asked by Prasad Marathe:

Hi Team,

I am getting error while accessing bamboo instance - Bamboo doesn't support HSQL database anymore, as it was replaced by H2. I am using Bamboo 5.14. Now i wanted to export my existing data.   
Please let me know how can i restore and get the current version running as it was running earlier. I don't remember when it was inaccessible but now i need it to run it for project build deployment.

Any quick help and support is really appreciated.

Thank you in advance.


Answers:
author: Baskar Annamalai
body: Hi [@Prasad Marathe](/t5/user/viewprofilepage/user-id/5200841)

To migrate the Bamboo database you will need to export the database and import it in a new installation with the selected database. The process is described in this document:

* [Moving your Bamboo data to a different database - Atlassian Documentation](https://confluence.atlassian.com/bamboo/moving-your-bamboo-data-to-a-different-database-289277250.html)

Best regards,  
Baskar Annamalai  
ServiceRocket
[YAML] Checkout branch for linked repository
Asked by Valerii:

Hi Team,

Is it possible to make "Override branch of a linked repository" using YAML spec configuration?

Bamboo version: 8.2.3

![Screenshot%202019-12-12%20at%2013.26.19](/t5/image/serverpage/image-id/252535i2D5D2BC9B1408AAC/image-size/large?v=v2&px=999 "Screenshot%202019-12-12%20at%2013.26.19")


Answers:
author: Eduardo Alvarenga
body: Hello [@Valerii](/t5/user/viewprofilepage/user-id/4984397)

In Bamboo, you can override the Repository Branch of a Linked repository on a Plan basis. Meaning the Plan will have a custom branch, but the Linked repository will remain unchanged. That will only work with the default repository of the Plan at the master-branch level as plan branches need to match the repository's branch name to work.

Check the following documentation for an example:

* [Overriding branch of a linked repository](https://docs.atlassian.com/bamboo-specs-docs/latest/specs.html?yaml#overriding-branch-of-a-linked-repository)

There is also a feature request that asks to allow overriding branches for non-default repositories in YAML specs:

* [BAM-21066 - Allow overriding branches for non default repositories in YML specs](https://jira.atlassian.com/browse/BAM-21066)

Make sure to vote on it and follow the ticket to be notified of any changes.

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


Tags: yaml
Maven task does not support profile in Goal
Asked by Rasha Elsayed:

Hi,

I have a bamoo build plan in which I added a maven task. In Goal I wrote

package -P prod-profile

But the artifact generated (jar file) is created with the default profile configurations, as it seems that the -P above is ignored.

Is there anything wrong in my entry?

I appreciate your support and look forward to hear from you.

Thanks a lot and best regards

Regards

Rasha Elsayed


Answers:
author: Eduardo Alvarenga
body: Hello [@Rasha Elsayed](/t5/user/viewprofilepage/user-id/5194555)

Welcome to **Atlassian Community**!

Check the pom.xml file for any *activeByDefault* set to false. Maven will only consider it if it is active.

Running **mvn help:active-profiles** will show the active profiles.

You also need to understand that the profile configuration needs to be carried on by the Project's pom.xml file. Or, you will have to replicate the profile configuration in one of the Agent's own locations (outside of the build scope):

* **%USER_HOME%/.m2/settings.xml**
* **${maven.home}/conf/settings.xml**

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful--

comments: author: Rasha Elsayed
body: Hello Eduardo,

thanks a lot for your reply. Actually I have 2 profiles:

* dev-profile having activeByDefault = and
* prod-profile does not set this property.

Running *mvn* *package -P prod-profile* from the command line on my local machine works correctly. The jar artifact is generated with the prod-profile configurations.

However in bamboo mvn task, when I enter *package -P prod-profile* in the Goal field, the jar file gets generated with the dev-profile configurations.

In addition, from command line

* running mvn help:active-profiles shows only dev-profile
* running mvn help:active-profiles -P prod-profile shows prod-profile

So, it seems that the Maven task in bamboo ignores the **-P** setting in the goal, right?


author: Eduardo Alvarenga
body: Hello [@Rasha Elsayed](/t5/user/viewprofilepage/user-id/5194555)

You should set *activeByDefault* on prod-profile in pom.xml so *mvn* would consider it. That's validated when you run the help:active-profiles command.

Your local machine or the Agent may have other Maven settings that may be considering/not considering that profile.

Thank you,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**


author: Rasha Elsayed
body: Hi [@Eduardo Alvarenga](/t5/user/viewprofilepage/user-id/4365410)

Thanks for your Response. I think i will replace the maven task with a script task in which i can run maven simply as

mvn package -P prod-profile

Regards

Rasha
Clone Environment in Deployment Project
Asked by Raymond Liu:

Is there a way to just clone an environment for the deployment project? Say I have int env already made, and I want to clone the int env(to make a new env), is it possible?


Answers:
author: Raymond Liu
body: Nvm, I found it

comments: author: Eduardo Alvarenga
body: Hello [@Raymond Liu](/t5/user/viewprofilepage/user-id/5131205)

To clone an environment:

* Edit the Deployment Project \>\> Select the Environment \>\> Actions \>\> Clone

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
How to override build hang configuration using bamboo yaml specs
Asked by margo:

Hello,

according to this ticket it should be possible to override the build hang configuration via yaml specs as of bamboo 8.1.1:

<https://jira.atlassian.com/browse/BAM-20887>

But I was unable to find any documentation explaining how to actually do this.

Can someone give a working example for this?

Kind regards

Markus


Answers:
author: Eduardo Alvarenga
body: Hello [@margo](/t5/user/viewprofilepage/user-id/5040616)

Here's a working example:

```
Default Job:
  key: JOB1
  other:
    all-other-apps:
      custom:
        auto: {}
        buildHangingConfig:
          minutesBetweenLogs: '5'
          minutesQueueTimeout: '20'
          multiplier: '2.5'
          enabled: 'true'
```

If you want to find examples of the syntax, the best way is to configure a sample Plan through the UI and [Export it to YAML](https://confluence.atlassian.com/bamboo/exporting-existing-plan-configuration-to-bamboo-yaml-specs-1018270696.html) format to find the expected syntax.

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: margo
body: I tried this and I see it reflected in the UI and after also lowering the multiplier I was able to confirm that the setting is working as expected.

Accepted the answer

Thank you for your assistance

Kind regards

Markus
How to configure Bamboo plan to trigger , when a pull request is created only to target branch
Asked by Prakasam A:

How to configure Bamboo plan to trigger the creation of a plan branch, when a pull request is created only to the target branch(master/Develop).  

I would like to avoid setting all stage's tasks as conditional, based on the variable `repository.pr.target.Branch.`  

`Please suggest solution for this ?`


Answers:
author: Eduardo Alvarenga
body: Hello [@Prakasam A](/t5/user/viewprofilepage/user-id/5126111)

Welcome to **Atlassian Community!**

Having the ability to match a specific source and target repository branch when configuring the automatic branch creation settings with pull requests is currently not available in Bamboo.

We have an open feature request that suggests adding the ability to match and expression when creating a Plan branch when coming from a Pull request:

* [BAM-19825 - Branch regular expression filter for automatic PR detection](https://jira.atlassian.com/browse/BAM-19825)

Please be sure to watch it, and vote on it, so that you're notified if this is implemented in a future release. You can even add a comment with your specific requirements so the developers can consider it.

For your reference, you can find our policy on how we prioritize feature and improvement requests on [this page](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html). I have also added an internal link to this case so that the developers can reference it if necessary.

Cheers,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Prakasam A
body: Thanks for the prompt response Eduardo Alvarenga.
CSV file not getting download in path and throwing error download folder is empty
Asked by shubham choudhary:

CSV file not getting download in path and throwing error download folder is empty ,when running on local test case is passed but when run through bamboo it is getting failed as saying that download folder is empty(means file is not getting downloaded in expected path).............i have print the path also it is showing as expected but CSV file is not getting downloaded in particular location...............please suggest possible solution


Answers:
author: Eduardo Alvarenga
body: Hello [@shubham choudhary](/t5/user/viewprofilepage/user-id/5187649)

Welcome to **Atlassian Community**!

It is a bit hard to understand your scenario without access to the Plan structure. Can you let us know how your Plan is organised? Do you have multiple Jobs or Stages? How does the Download task happen? Do the download and the consumer script tasks happen at the same Job level?

As you mentioned you have added a "*print the path*" task, can you also list the path contents and check if the downloaded CSV file is there?

As this is a public forum, make sure to mask any information that may compromise your environment before pushing it.

Kind regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**
How to get Notifications for only a specific Branch in Multi-Branch Plans
Asked by Tim Kopplow:

Howdy ??

I have couple Multi-Branch Builds with quite some branches in them. I now want to enable Notifications but only for Master for example. I don't need to know every failed feature branch a dev is working on.

According to this thread, this works when using Bamboo Specs instead of the WebUI to define a plan: <https://community.atlassian.com/t5/Bamboo-questions/How-to-disable-notifications-for-spec-branch-builds-while/qaq-p/1499030>

Unfortunately we're not using Specs atm and would need this functionality with the webui.

I could probably create a separate Plan, but that's not ideal.

I appreciate any advice on this!

Thanks in advance.


Answers:
author: Eduardo Alvarenga
body: Hello [@Tim Kopplow](/t5/user/viewprofilepage/user-id/5008361)

From Bamboo 7.0, you can specify if a Plan branch will send notifications. Simply go to the Plan branch configuration, "**Notifications** " tab and choose "**Notifications should not be sent for this branch**".

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Tim Kopplow
body: This is **an answer** but we've linked Repo's from Bitbucket and there're a lot of plan branches our team is working on.

There're also many branches getting created each day/week. I really don't want to manually disable this setting for each new plan branch by hand.

Maybe there's a way to change the default notification behavior of plan branches?
Selenium Tests are running headless / background process in Bamboo application
Asked by Manikandan Periyasamy:

I am running my simple selenium tests inside Bamboo server and they are not running in in the foreground but the same was working in fine last two years. This problem is for last few months / weeks. Can you please help me if we have any bamboo version upgrade or any issues with Bamboo?


Answers:
author: Eduardo Alvarenga
body: Hello [@Manikandan Periyasamy](/t5/user/viewprofilepage/user-id/5186149)

Welcome to **Atlassian Community**!

We recommend not publishing internal details from your Bamboo instance, such as URLs. The Atlassian Community is a public forum, and the information will be exposed.

As your issue relates to a specific build constraint, we recommend you log a ticket with Atlassian at <https://support.atlassian.com/contact>. Once there, you can provide internal details from your environment and a better description of the issue.

Sincerely,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Manikandan Periyasamy
body: Thank you [Eduardo Alvarenga.](https://community.atlassian.com/t5/user/viewprofilepage/user-id/4365410)


Tags: selenium
List all bamboo agent capabilities via rest
Asked by Paul Moors:

How can I list the capabilities for a bamboo agent using the rest api?  

I was thinking that rest/api/latest/agent/\<agent-id\>/capability should work but there is no result.  


Answers:
author: Eduardo Alvarenga
body: Hey [@Paul Moors](/t5/user/viewprofilepage/user-id/538219)

That endpoint should work. Here's an example:

```
$ curl -s -H "Accept: application/json" -uuser:pass -X GET 'https://bamboo.mydomain.net/rest/api/latest/agent/56066049/capability' | jq
[
  {
    "key": "system.docker.executable",
    "value": "/bin/docker",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.git.executable",
    "value": "/bin/git",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.jdk.JDK 1.8",
    "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.el9_1.x86_64",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.jdk.JDK 1.8.0_362",
    "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.el9_1.x86_64",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.jdk.JDK",
    "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.el9_1.x86_64",
    "source": "AUTO_DETECTION"
  }
]
```

Check this other Community question for a KB article that shows how to export it in a consumable format:

* [Read Bamboo capability through rest api](https://community.atlassian.com/t5/Bamboo-questions/Read-Bamboo-capability-through-rest-api/qaq-p/2313599)

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC

**--please don't forget to Accept the answer if the reply is helpful--**

comments: author: Paul Moors
body: The information is indeed very helpful, except that I get a 404 error when using that endpoint as described


author: Eduardo Alvarenga
body: Hi [@Paul Moors](/t5/user/viewprofilepage/user-id/538219)

Bamboo REST API will return 404 if it can't find the Agent id. Check the URL you are using and replace it with your Agent id.

Best regards,

Eduardo Alvarenga  
Atlassian Support APAC


author: Paul Moors
body: I use one of the agent-id's that are being returned when using endpoint rest/api/latest/agent. See below.  

For example:  

![2023-04-03 14_11_29-Window.png](https://community.atlassian.com/t5/image/serverpage/image-id/249476i8BF47C663852174F/image-size/large?v=v2&px=999 "2023-04-03 14_11_29-Window.png")  

Is that the correct id which I'm using?


author: Eduardo Alvarenga
body: That's correct if you want to get information from the Local Agent.