youngmon/atlassian-qna huggingface dataset:
OpsGenie extraProperties on Incident Template
Asked by Janine Caddick:

Hi,

I am trying to add in to the incident template an extra field added under Extra Properties.

I have tried to reference this many different ways in the incident email template, but cannot get it to show in the email. Does someone have an example how to do this?

Thanks!


Answers:
author: Darryl Lee
body: Hi Janine,

This is Darryl, Opsgenie Support, happy to help. :smile:

Are you trying to add some extra properties upon an Incident Creation and would like to see them included in the Incident Email Notification body for the stakeholders?

Please note that both the Incident Template and Email Template for Stakeholders are available only on the Enterprise Subscription.

This feature sets work normally as per my latest testing.

\<Steps\> {#toc-hId--1323008012}
--------------------------------

1. Add an **Incident Template** with 2 **Extra Properties** at the path: **Settings \> Incident templates \> Add incident template**   
   ![](https://getsupport.atlassian.com/secure/attachment/5145475/5145475_image-2020-09-21-12-54-44-251.png)
2. Add an **Email Template** to incorporate the **{{extraProperties}}** in the email body at the path: **Settings \> Email templates \> Create new email template** .  
   ![](https://getsupport.atlassian.com/secure/attachment/5145700/5145700_image-2020-09-21-12-56-59-355.png)
3. Create a new Incident at with selecting the predefined **Incident Template** and ensure the **Extra Properties** field and **Email Template** field has been populated as defined in the Incident Template. Path: **Incidents \> Create incident** .  
   ![](https://getsupport.atlassian.com/secure/attachment/5145709/5145709_image-2020-09-21-12-59-19-672.png)
4. Wait for a short while, your Stakeholders will receive the Email Notification for this new-created incident with the Extra Properties populated in the email body.  
   ![](https://getsupport.atlassian.com/secure/attachment/5145740/5145740_image-2020-09-21-13-00-26-197.png)

Hope this can help.

Kind regards,

Darryl Lee

Opsgenie Support

comments: author: Janine Caddick
body: Hi Support,

The images here appear broken. Can you repost so that I can try to replicate.

Many Thanks


Tags: cloud
Is it possible to auto-acknolwedge alerts?
Asked by Steve Wareham:

It is possible to create a team policy that auo-acks alerts based on certain criteria? For example, if the alert message is "some alert" and dedup count is less than 2, just auto-ack it?


Answers:
author: Robert
body: Hi [@Steve Wareham](/t5/user/viewprofilepage/user-id/4083550) !

It isn't currently possible to auto-acknowledge alerts and that's by design. In Opsgenie, the acknowledged state is there to explicitly indicate "I have seen this alert and acknowledge it exists." Being able to acknowledge it automatically (or on behalf of another user) breaks the accountability acknowledging an alert and Opsgenie's escalations depend on.

That said, there are similar actions (like auto-close) you can take action on. Similarly, you can have notifications suppressed as long as the deduplication count is under a given value. Both of these actions fall under [Notification Policies.](https://docs.opsgenie.com/docs/team-policies#notification-policy)

If you still want the ability to auto-acknowledge an alert, the option to customize this is there using a combination of outgoing integrations (webhook, outgoing SNS, OEC, etc.) and the Alert API.

Hope this helps!

comments: author: James Barrett
body: We have a situation where app pools get cycled every night, which launches about 100 alerts over a 3 hour period. it would be nice to block off this time to auto-ack the alerts or ignore them. Otherwise people are getting woken up at 3am. can't cycle them any other time because of the impact to clients.


author: James Barrett
body: posted by accident, please delete
Unable to convert Opsgenie ack time from unix timefield to datetime field
Asked by Ajaykumar Panchal:

I am struggling on converting opsgenie alert ack time from unix timestamp to datetimestamp. as it differ for each alerts differently.

Unix timestamp ranges from 8 to 10 character but in opsgenie it not consistent. Can you please help!

I am working on fetching data from opsgenie to PowerBI.


Answers:
author: Robert
body: Hi [@Ajaykumar Panchal](/t5/user/viewprofilepage/user-id/4084683) !

The reporting fields of an alert (ackTime, closeTime, etc.) are relative and is measured in milliseconds since the alert was created. This is meant to agree with the unix-milliseconds timestamp used for absolute timestamps elsewhere in the application.

So an ackTime of 10000 would convert to 10s after the alert was created.

Hope this helps!

comments: author: Ajaykumar Panchal
body: Thanks for your reply!! can you please help lets say I want to convert acktime into datetime format? How can I achieve it.


author: Robert
body: [@Ajaykumar Panchal](/t5/user/viewprofilepage/user-id/4084683) You would want to add that ackTime duration to the createdAt value returned in the API.


author: Ajaykumar Panchal
body: thanks Robert


Tags: cloud

rest-api
Opsgenie integration with PowerBI using Rest API
Asked by Ajaykumar Panchal:

I am trying to integrate Opsgenie alerts api in PowerBi using Web contents. But I facing challenges to fetch list of alerts lets say for last one months. As it limits the record to 100 for API call. Can you please help us with DAX query in powerBI to meet the requirement of fetching data for last month. can you please help on how we can use pagination as an option.


Answers:
author: Robert
body: Hi [@Ajaykumar Panchal](/t5/user/viewprofilepage/user-id/4084683) !

A URL for the next set of alerts will be returned in the headers and body of your API call. We have documentation on pagination here:

<https://docs.opsgenie.com/docs/pagination>


author: Luis Miguel Zu?iga Cervantes
body: Hi [@Ajaykumar Panchal](/t5/user/viewprofilepage/user-id/4084683)

I have the same problem. I've tried with loops in Power Query but didn't work.

Did you find the solution ?  

comments: author: Ajaykumar Panchal
body: ```
let iterations = 10,          // Number of iterations url =   "https://api.opsgenie.com/v2/alerts?query=<enter your query here>",  FnGetOnePage =  (url) as record =>   let    Source = Json.Document(Web.Contents(url,[Headers=[Authorization="GenieKey XXXXXXXXXXXXXXXXXXXXXXXXX"])),    data = try Source[data] otherwise null,    next = try Source[paging][next] otherwise null,    res = [Data=data, Next=next]   in    res,  GeneratedList =  List.Generate(   ()=>[i=0, res = FnGetOnePage(url)],   each [i]<iterations and [res][Data]<>null,   each [i=[i]+1, res = FnGetOnePage([res][Next])],   each [res][Data]) in  GeneratedList
```


Tags: cloud
Only alert if dedupe count is greater than one.
Asked by Steve Wareham:

Is it possible to create a team policy for something like this? We have a use case where the first alert for an alias is usually not requiring any action, unless it happens again. So we really only needed an alert once the dedupe count gets to two.

Or something else with the same effect? Such as auto acknowledge alerts when the dedupe amount is one? Can team policy do that? So far I can only see how to delay the alert based on dedupe count but I actually want to suppress alerts based on the count.


Answers:
author: Nick H
body: Hi [@Steve Wareham](/t5/user/viewprofilepage/user-id/4083550) !

This is possible with Notification Policies: <https://docs.opsgenie.com/docs/team-policies#notification-policy>

Notification Policies can be added under a team's Policies tab, and can be configured to do exactly this; delay notifications unless the deduplication count is greater than one (or another number).

This type of policy would look something like this:

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

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

comments: author: Steve Wareham
body: Hi Nick, thanks for the reply! I'm just not understanding the UI here, it says "**Delay** notifications unless the de-duplication count is equal to '2'. So does that mean if the de-duplication amount never reaches 2 then the alert is never sent? If so that would be perfect!


author: Nick H
body: That's correct! The alert would still be created, but notifications would not be sent to users until the count of the alert hits a deduplication of x2.


author: Steve Wareham
body: OK, Thanks Nick!
What future versions of SQL Server will Bamboo support in upcoming releases?
Asked by AMC Web Team:

Hello Attlassian Team,  

The following documentation outlines versions of SQL Server which will be deprecated in future releases. As new versions of Bamboo get released will support for newer versions of SQL server beyond 2017 get supported?  

<https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html>  

Best, Miguel


Answers:
author: Jeyanthan I
body: Hi [@AMC Web Team](/t5/user/viewprofilepage/user-id/702946),

There is an open feature request to support SQL Server 2019. Please upvote and follow to get updates on progress.

* [Support for MS SQL 2019 - BAM-20711](https://jira.atlassian.com/browse/BAM-20711)

Hope that helps.

Cheers,  
Jey

comments: author: AMC Web Team
body: Thanks!
bamboo Java Spec configuration
Asked by Manjunatha NS:

Hi Team,

am very new to bamboo spec but I did not get proper documents to use bamboo java spec, I have invested one day to create a build pipeline using bamboo java spec

below are the current requirements tried with below steps

- I have existing build plan and exported it as java spec

- clone the code from SCM and created a new folder called bamboo-spec

- inside bamboo-spec folder what are all things I need to add to execute the spec?

- can you please where should i use exported java spec? and how?

Zscaler is using bamboo from a very long time, please advise as soon as possible (very much appreciated if you can assist on-call)


Answers:
author: Marcin Gardias
body: <https://confluence.atlassian.com/bamboo/tutorial-create-a-simple-plan-with-bamboo-java-specs-894743911.html>
Howto remove plan/deployment from yaml generated project
Asked by Aske Jenstrup Olsson:

Hi,

How do I remove/delete plan and deployment projects when generated with yaml specs?

If I remove the part specifying the plan/deployment from yaml, the plan/deployment is still visible in bamboo.

Br,

Aske


Answers:
author: Aske Jenstrup Olsson
body: Found it:

Deployment project -\> View project configuration -\> ... -\> Delete projects


Tags: spec

yaml
Error "Server has not specified Agent bootstrap version." when installing agent
Asked by Federico Silva Armas:

* Downloaded installer jar from bamboo server.
* java -jar atlassian-bamboo-agent-installer-6.8.3.jar https://\<server_url\>/agentServer
* Log with error:

\[WrapperSimpleAppMain\] \[RemoteAgentHttpClientFactory\] Creating a new HTTP client...  
\[WrapperSimpleAppMain\] \[AgentContext\] Authenticating against Bamboo server at https://\<server_url\>/agentServer/  
\[WrapperSimpleAppMain\] \[AgentContext\] Successfully authenticated with Bamboo server  
Exiting due to fatal exception.  
java.net.ProtocolException: Server has not specified Agent bootstrap version. Please re-install the agent.


Answers:
author: Gonchik Tsymzhitov
body: [@Federico Silva Armas](/t5/user/viewprofilepage/user-id/828281) Did you catch the error in the logs?

I hope you just reinstalled the agent
How to create a JIRA issue automatically, when bamboo build task fails
Asked by sunder srinivasan:

HI There,

I am new to Bamboo.

We are requested to create JIRA-Bug whenever build fails in the Bamboo Plan automatically.

Please advise.

Regards

Sunder


Answers:
author: Richard White _TechTime_
body: Hi Sunder,

As I understand, there is no native way to do this from bamboo UI, there is an open ticket for this functionality here:

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

As a workaround, you could set up the build to send emails to your jira, and create bug reports using automation on the jira side.

There are other questions on this community, and some answers have suggested using a REST API call: [Here](https://community.atlassian.com/t5/Jira-questions/Automatically-creating-a-jira-issue-after-a-failed-bamboo-build/qaq-p/89035)

Or using the [pre-post build command plugin](https://marketplace.atlassian.com/apps/5581/pre-post-build-command-runner?hosting=server&tab=overview)to achieve the same result

comments: author: Kazi Rizwan
body: [pre-post build command plugin](https://marketplace.atlassian.com/apps/5581/pre-post-build-command-runner?hosting=server&tab=overview) works until version 6.2 bamboo

<https://community.atlassian.com/t5/Jira-questions/Can-we-create-Jira-issue-automatically-in-case-of-build-failure/qaq-p/820165>

[@Richard White _TechTime_](/t5/user/viewprofilepage/user-id/2235039) can you explain a little more detail how to set up automation on jira side in case bamboo build fails ?
How to enable AWS Spot Instances specific build plan?
Asked by Sravani Pasala:

Greetings Team,

we are using version 6.10.2 build 61006 and We are planning to create a new elastic agent configuration that uses spot instances. As we see it is enabling globally but we want it to a specific build plan.


Answers:
author: Steffen Opel _Utoolity_
body: Hi Sravani, welcome to the Atlassian Community!

I'm afraid this is not possible, because you can only have one [Elastic Bamboo](https://confluence.atlassian.com/bamboo/about-elastic-bamboo-289277118.html) configuration, and using spot instances is a binary choice at this point.

Unfortunately, the entire Elastic Bamboo feature has hardly seen any notable improvements beyond minimal maintenance for several years, as evidenced by the resp. [backlog](https://jira.atlassian.com/issues/?jql=project%20%3D%20BAM%20AND%20component%20%3D%20%22Elastic%20Bamboo%22%20and%20resolution%20%3D%20unresolved%20order%20by%20votes%2C%20created%20desc). That's a real pity, esp. given AWS is continuing to evolve their auto scaling and cost saving capabilities with significant additions like [EC2 (Spot) Fleets](https://aws.amazon.com/blogs/aws/ec2-fleet-manage-thousands-of-on-demand-and-spot-instances-with-one-request/), [Amazon ECS](https://aws.amazon.com/ecs/), [Amazon EKS](https://aws.amazon.com/eks/), and [AWS Fargate](https://aws.amazon.com/fargate/), just to name a few. And as of this week you could conceptually even run shorter builds in [AWS Lambda](https://aws.amazon.com/lambda/) due to its new [EFS integration](https://aws.amazon.com/blogs/aws/new-a-shared-file-system-for-your-lambda-functions/).

That being said, all these AWS innovations provide opportunities to craft custom workarounds, for example:

* you could replace or complement your Elastic Bamboo configuration with regular [remote agents](https://confluence.atlassian.com/bamboo/remote-agents-289277115.html) orchestrated by resp. capacity provider in AWS (see below)
* you could provide a mix of on-demand and spot remote agent capacity on EC2 instances via [EC2 fleets](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html)
* you could provide a mix of on-demand and spot remote agent capacity on ECS containers via [Fargate capacity providers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html)

I hope this allows you to gauge your options.

Good luck,  
Steffen

PS: Every other month I'm pondering whether there might be sufficient demand for a commercial app that complements our [AWS integrations](https://marketplace.atlassian.com/vendors/772927/utoolity) by implementing one or more of the aforementioned ideas, but cannot seem to justify it in relation to other initiatives. Feel free to [get in touch](https://utoolity.atlassian.net/wiki/spaces/UAA/pages/17235996/Contact+Support) if you would be interested to explore this together.


Tags: elastic-agent

elastic-bamboo
Bamboo Yaml Spec Files checkout specific branch
Asked by danieldaeschle:

I can't find a way in the yaml spec reference to checkout a specific branch of a (linked) repository. Creating an extra linked repository for each branch isn't a clean solution in my opinion.

Does anyone know about this?


Answers:
author: Richard White _TechTime_
body: [@danieldaeschle](/t5/user/viewprofilepage/user-id/3708021)

We ran into a similar problem, where we wanted to checkout specific tags or branches of dependencies, depending on the versions used in the main project that is being tested.

I did find a solution, but it is not exactly "clean" - in fact it is really complicated given the simplicity of what I wanted to achieve.

At the start of the build I defined a task, which parses the version of the dependency from the main build and exposes it as a "result variable". In our case they are all maven projects, so we use the [Maven Pom Value Extractor plugin](http://%20In our case they are all maven projects, so we use the Maven Pom Value Extractor plugin for this part) for this part.

Then I have defined stages to build each of dependencies. The first task in each of these stages uses a Script task to manually checkout the correct tag / branch of the dependency.

We use java specs so I don't have yaml version to hand, but the basic format is like this:

Stage 1 : Check dependency versions

1. Extract dependency versions as result variables e.g \`dependency_x_version\` (Using pom value extractor)

Stage 2: Build dependency x

1. Script task which checks out git branch or tag based on result variable \`dependency_x_version\`
2. build dependency 1

...More stages for other dependencies

Final Stage:

- Build main product we want to test.

comments: author: danieldaeschle
body: How do you manually checkout that branch?


author: Richard White _TechTime_
body: Oh, forgot to actually answer the question:

First we have a checkout task, which checks out the dependencies master branch.

Then, we have a script task with contents similar to below:

```
#!/bin/bash -x

EXPECTED="${bamboo_variable_for_target_branch}"

git branch -a
git checkout $EXPECTED

CURRENT=`git rev-parse --abbrev-ref HEAD`
if [ "$CURRENT" == "$EXPECTED"];
then
echo "Now on branch $CURRENT"
exit 0
fi

echo "On branch $CURRENT, either $EXPECTED does not exist or repo cache outdated
```

Notes:

- We had to select the option: "Fetch Whole Repository" on each linked repo

- We had to make sure to checkout each dependency into it's own working directory (and set the script task's working directory to match the dependency in question


author: Marcin Gardias
body: Try sth. like this (requires Bamboo 6.10 or later)

```
version: 2

plan:
  project-key: PRJ
  key: PLAN
  name: Plan name
  master-branch: branchX

stages:
  - Default stage:
    - Default job

Default job:
  tasks: []

triggers: []
```

comments: author: danieldaeschle
body: i need it for another repository which will be checked out, not the main repository.
YAML Spec Stages and artefacts !?
Asked by Julien Tognazzi:

Hello !

[From Bambo documentation](https://confluence.atlassian.com/bamboo/bamboo-yaml-938844479.html)
> In Bamboo YAML Specs, artifacts are shared by default. Artifacts are downloaded between stages, e.g user Defines Stage 1 with Artifact A, Stage 2 with Artifact B and Stage 3. This means that Stage 2 will download Artifact A from Stage 1 and Stage 3 will download both Artifact A and B from previous stages.

But this is not what I am experiencing...

Is the documentation once more wrong here ?


Answers:
author: Jimmy Seddon
body: [@Julien Tognazzi](/t5/user/viewprofilepage/user-id/726054) could you please provide a bit more detail about exactly what you believe is wrong? With the clip you have provided I'm not exactly sure what you are referring to.

Thanks!

comments: author: Julien Tognazzi
body: Yes I have to write a test spec, and then I will update my question...

But what I understand from the paragraph quoted, is that the artefacts shared in a first stage will be automatically downloaded in the second stage. without any statement.

and this is not what am I experiencing.

Update;

Ok I think I need some rest.

I did my test with 2 jobs, dumb.

With two stage the automatic download of artefact seems to work
Unable to find 'attachments' directory inside bamboo home
Asked by Shivam Singh:

I am running bamboo through docker and i want to change the logo and favicon of bamboo but i am unable to find the 'attachments' folder inside bamboo home directory.

I followed this [link](https://confluence.atlassian.com/bamboo/customizing-bamboo-headers-994314733.html)


Answers:
author: Shivam Singh
body: Found the solution myself. I just created the required directories (attachments, logos) manually and copied my bamboo-logo.png and bamboo-favicon.ico file and after refresh it worked well.
Gradle build fails when trying to retrieve git properties
Asked by Eduardo Rodrigues:

Using a private repo with "Fetch whole repository" enable.

It's a java/gradle project that uses this pluging to retrieve repo/branch information

```
gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.2
```

It throws the following exception

16-Jun-2020 16:12:30 Execution failed for task ':generateGitProperties'.  
16-Jun-2020 16:12:30 \> org.eclipse.jgit.errors.MissingObjectException: Missing unknown ....2b49aa19472cec0750ba8

It works ok locally on my computer.


Answers:
author: Andrey Rybachenko
body: The same problem. On Bamboo CI, "**com.gorylenko.gradle-git-properties** " plugin can retrieve git branch name, but it fails on "**git.commit.id** ", "**git.commit.time**", etc.. (from Bitbucket repository). Running on a local computer (Mac) all repo info retrieved OK.

The only thing I noticed - that plugin can not retrieve "**git.commit.id** " (not failed, just no value in results) before I open PR from branch on Bitbucket, but after creating PR all info are available.  

As a temporary workaround I use Bamboo environment variables in conjunction with SpringBoot's **buildInfo()** plugin for Gradle:

```
springBoot {
  buildInfo {
    properties {
      additional = [
        'buildNumber': java.util.Optional.ofNullable(System.getenv("bamboo_buildNumber")).orElse("[not available]"),
        'gitCommitId': java.util.Optional.ofNullable(System.getenv("bamboo_planRepository_revision")).orElse("[not available]"),
        'gitBranch': java.util.Optional.ofNullable(System.getenv("bamboo_planRepository_branchName")).orElse("[not available]")
      ]
    }
  }
}
```

<br />