youngmon/atlassian-qna huggingface dataset:
Missing nagios alerts due to flap detection
Asked by Renish Joseph:

Lots of notifications from Nagios is not being sent to opsgenie due to flap detection. Is there any way to tackle this issue other than disabling or changing flap detection threshold?


Answers:
author: Rahul S
body: Hi Renish,

Would you mind letting us know where exactly the flap detection is occurring?

Are you referring to the [flap detection](https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/flapping.html), configured in Nagios? Or If you referring to the Opsgenie's ability to close the alert from Nagios when they're marked OK?

If this is something related to Nagios, we'd suggest reaching out to the Nagios community at <https://www.nagios.org/about/community/>

If Opsgenie is referred here, then, do note that Integrations can automatically create and close alerts received from an external source\[Nagios\] via *create rules and close rules*, respectively.

You can also make use of our [Notification](https://support.atlassian.com/opsgenie/docs/create-and-manage-team-alert-policies/) \& [Escalation policies](https://support.atlassian.com/opsgenie/docs/how-do-escalations-work-in-opsgenie/) that allows you to control when to notify after receiving an alert, and also allow you to handle alerts from Nagios that flap - without notifying people.

Let us know if this workout for you.

Regards,


Tags: cloud

nagios
Opsgenie Acknowledgement assigns to technician who acknowledged only?
Asked by Jonathan Mayer:

Currently if a technician acknowledges an alert, they get the assignment in Jira. Is it possible to make it where if anyone acknowledges the alert, it assigns the ticket to a specific team instead of the technician?


Answers:
author: Jessie Turpin
body: Hi Jonathan!

This isn't directly possible within the Jira integration with Opsgenie. However, you could setup the integration using the [Opsgenie Edge Connector (OEC)](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira-service-management/#Download-the-latest-version-of-OEC). Using the OEC you can customize the script to assign the team the ticket in Jira.

Another approach would be to utilize [automation rules](https://www.atlassian.com/software/jira/guides/expand-jira/automation) within your Jira project to assign the team when an issue is created from Opsgenie.

Thanks,  
Jessie
Bamboo specification yaml include a task
Asked by Jurn van Mieghem:

I am currently investigating the use of Bamboo-specs using yaml. As we have a few scripted tasks that are fairly similar for different jobs I wanted to separate the script from the rest of the spec file. However I am getting errors;

```
Bamboo YAML import failed: Document structure is incorrect: Run tests / tasks / [1]: Task must have its type defined as the only YAML property
```

Stucture of bamboo-specs.yaml;

```
---
version: 2
plan:
  project-key: DDNAM
  key: ATLUIR
  name: Testing - ATL UI regression (experimental)
stages:
  - Run all tests:
      manual: false
      final: false
      jobs:
        - Run tests
Run tests:
  key: CT
  tasks:
    - checkout:
        path: testing
        force-clean-build: 'true'
    - !include 'tasks/robot_run_chrome.yaml'
    - !include 'tasks/robot_run_firefox.yaml'
......more config....
```

tasks/robot_run_chrome.yaml:

```
script: |
        ./scripts/ui-test-runner.sh -t "${bamboo_RobotFiles}" \
        --variable browser:Chrome \
            ...some other variables....
        --variable BambooBuildID:${bamboo.buildResultKey}
        exit 0
workingDirectory: testing
```

Can someone help me out on how to make these files work

We use Bamboo 7.1.1 (on premise)

---- UPDATE-----

Apparently the workingDirectory property caused an issue, if I remove it the task works.

However how can I add the workingDirectory to this script or is cd to folder the only option?


Answers:
author: Thomas Minney
body: After having this error myself, I found the problem was incorrect indentation of properties within a task's YAML definition.


author: Thomas Minney
body: The working directory for a script is specified using

working-dir

<https://docs.atlassian.com/bamboo-specs-docs/latest/specs.html?yaml#task-script>
How to set ec2 instance options upon elastic launch (IMDSv2 metadata specifically)
Asked by Chris Stevens:

One of the AWS recommendations in Security Hub considered "High" severity is setting all EC2 instances to use Instance Metadata Service Version 2 (IMDSv2). Is there a way to make this happen with elastic Bamboo instances?

If I have access to edit the command that's run to launch the instances, that would work (--metadata-options "HttpEndpoint=enabled,HttpTokens=required" added to the aws ec2 run-instances command). If I'm not able to edit that, any other thoughts? Thanks in advance!


Answers:
author: Alistair.Mackay
body: Hi [@Chris Stevens](/t5/user/viewprofilepage/user-id/3731887)

The best way I've found to modify an EC2 instance when it's launched is to use CloudWatch Events and Lambda. You could adapt the solution I developed for adding additional security groups to a launching elastic agent.  

See [my original question](https://community.atlassian.com/t5/Bamboo-questions/EC2-elastic-agent-security-groups/qaq-p/1148160) and [the solution](https://github.com/fireflycons/bamboo-elastic-agent-security-groups).


author: Lei P
body: For whoever find this thread, let's push Atlassian support this via <https://jira.atlassian.com/browse/BAM-21978>


author: Lei P
body: Hey, Atlassian team, this is a Sec issue many bamboo user will need for AWS Integration. Please provide a native solution ASAP.

Bamboo should support native IMDS v2 instead customer has to update post ec2 launch.
Can a Bamboo remote agent be on a remote network separate from that running Bamboo
Asked by yogesh_devi:

Helli,

I am running a Bamboo server version 7.1.1 build 70117 - 23 Jul 20. We expect the Bamboo server to run on public cloud . We use remote agents.

My question is can we use a remote agent that is running in our on-premise lab connecting to Bamboo running on Public cloud

Or in other words can the Bamboo server and the remote agent be on two separate networks that are geographically separated ?

If yes, is there a documented process to do this


Answers:
author: Jeyanthan I
body: Hi [@yogesh_devi](/t5/user/viewprofilepage/user-id/737128) ,

Of course, you can have agents and server on different networks. Bamboo server and agents need 2 ports to talk to each other. I can share the ports that need to be opened for it to work fine and you can decide how to configure in your setup.

* Port of the Bamboo itself: 8085 by default and when no proxy is used.
* Port of the broker: 54663 by default. You'll find the full broker url in the Bamboo admin panel (System -\> General Configuration)

The traffic between agent and server is bi-directional, initial connections are only sent from agent to server. Responses are sent from server to agent. For more info check this page:

* [Technical Overview of Remote Agent Connectivity Mechanism](https://confluence.atlassian.com/bamkb/troubleshooting-remote-agent-216957427.html)

Cheers,  
Jey

comments: author: yogesh_devi
body: Hi Jey - Thanks a lot for your prompt response
git credential storage exception while using github
Asked by bhumika kaddugol:

Hello I am using checkout from github for maven projects in bamboo plan but it is showing git credential storage exception even though I have entered acess token alsp could you help me ?


Answers:
author: bhumika kaddugol
body: Hello !

I have tried that cmd in cmd promt as I typed it went to crome for checking username and pwd U can see I have shared images also but after that not able to choose in any of the 3 option U can see it


author: Jeyanthan I
body: Hi Bhumika,

From the limited information you shared, I understand you have issues with cloning a Git repository using "Source code checkout" task.

To verify if the issue is specific to Bamboo only, could you please run the below command with the same credentials configured in Bamboo and see if it works? This is to see if the credentials work fine with your private repository outside of Bamboo.  

```
git ls-remote https://username@github.com/proj/reponame.git
```

You may also have to make sure that the personal access token has repo and user scope, and if Bamboo uses the right token. You may check if your token is OK by running something like below on the Bamboo server:  

```
curl -u $USERNAME:$TOKEN https://api.github.com/user/repos?per_page=100
```

comments: author: bhumika kaddugol
body: Hello! I am connecting to github without providing username and password and my repository is public access


author: Jeyanthan I
body: Hi Bhumika, have you got a chance to try what I requested above?

What happens when you try to clone on your server via a command prompt outside Bamboo?

Also, your logs/atlassian-bamboo.log should hint what the problem is. It could sometimes be that the particular user as which Bamboo is running might not have access to a particular directory where the git operation happens. You should be able to find this out from the server log entries.

Cheers,  
Jey


author: bhumika kaddugol
body: ![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/122907i310A8FAFA9704F0E/image-dimensions/775x149?v=v2 "Capture.PNG")![Capture1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/122908iC33AA543FE955948/image-size/large?v=v2&px=999 "Capture1.PNG")


author: bhumika kaddugol
body: Hello !

I have tried that cmd in cmd promt as I typed it went to crome for checking username and pwd U can see I have shared images also but after that not able to choose in any of the 3 option U can see it


author: Jeyanthan I
body: Hi Bhumika,

From your screenshot, I see you have copy-pasted my command literally without modifying it with your username and the respective Git repository. Please contact your administrator for any assistance with running the respective command via command prompt.

Cheers,  
Jey


author: bhumika kaddugol
body: Hi,

Sorry I blindly copy pasted that one now I am sharing U can see but it is showing remote not found.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/123511i61BEF28843F3AD9E/image-size/large?v=v2&px=999 "Capture.PNG")
Bamboo: 10 Job limitation in Bamboo - Plan Branches
Asked by Communardo Einkauf:

A customer has the following question:  
1. the $10 for Bamboo Server version includes 10 jobs There are also so-called Plan Branches, which according to Atlassian have a multiplying effect on the number of used jobs. However, he has found two pieces of information from Atlassian himself.  
o <https://confluence.atlassian.com/confeval/development-tools-evaluator-resources/bamboo/bamboo-10-job-limitation-in-bamboo>

Here it says from Atlassian in the FAQ that there is no multiplication of the jobs.  
o <https://www.atlassian.com/software/bamboo/pricing> However, it says here under the point "Do plan branches count as Jobs? that the multiplication takes place.

<br />

Do you know which of the statements is correct? Since Atlassian presents different statements, my customer unfortunately do not know which statement he can believe.

Thank you,

Stef


Answers:
author: Jeyanthan I
body: Hi Stef,

Thanks for bringing this up. I believe you are referring to the below section in the FAQ page.
>
> #### DO PLAN BRANCHES COUNT AS JOBS? {#toc-hId--596982544}
>
> Yes. The use of the [Plan Branches](https://confluence.atlassian.com/display/BAMBOO/Using+plan+branches) feature has a multiplicative effect on the number of jobs configured, and therefore, an effect on the 10-job cap. For example, a plan with two jobs that is building against a total of three branches (the plan's original branch, plus two additional branches) will contribute 6 jobs toward the limit.

If so, this use to be the case until Bamboo 6.9. I'll ensure that this section is updated with the right information that aligns with the current scenario.

The correct answer is mentioned in [this page](https://confluence.atlassian.com/confeval/development-tools-evaluator-resources/bamboo/bamboo-10-job-limitation-in-bamboo) :
> The use of [Plan Branches](https://confluence.atlassian.com/bamboo/using-plan-branches-289276872.html) doesn't have a multiplicative effect on the number of jobs configured, and therefore can't effect on the 10 jobs cap. For example, a plan with two jobs that is building against three branches (the plan's original branch, plus two extra branches) will contribute two jobs toward the limit.

You may also follow this page to [list those Bamboo jobs that are counted for license restrictions.](https://confluence.atlassian.com/bamkb/bamboo-starter-license-checking-number-of-bamboo-jobs-for-license-restrictions-950278536.html)

Hope that clarifies.

Cheers,  
Jey
Why SSH is insecure for Bitbucket and Bamboo connectivity?
Asked by Rajdeep Das:

Hi Team,  

I just wanted to know why the SSH process has been termed insecure while connecting the Bitbucket server repository to a Bamboo build plan. For now, I see that's the only process to connect to the bitbucket server.

Ifs it is being replaced with HTTPS?


Answers:
author: Gonchik Tsymzhitov
body: Hi [@Rajdeep Das](/t5/user/viewprofilepage/user-id/4179826) ,

I would say it's secure because it's secure shell

* <https://www.ssh.com/ssh/protocol/>

The problerm with key exchange and cipher:

* <https://community.progress.com/s/article/SSH-Weak-Key-Exchanges-Ciphers-HMAC-Sunset-on-3-17-2019>

https protocol has the problem situation with ciphers.


Tags: ssh
Attempt to add bamboo remote agent causes error with chmod
Asked by yogesh_devi:

Hello , I am running [Atlassian Bamboo](http://www.atlassian.com/software/bamboo/) version 7.1.1 build 70117 - 23 Jul 20.

I am trying to Add a Ubunto 20 remote build agent

When I try running the agent installer jar as show below

java -jar atlassian-bamboo-agent-installer-7.1.1.jar <https://atlproxy.ucalabs.com/bamboo/agentServer/>

I get following error .

```
Installing file: /generic/lib/wrapper.jar to: /root/bamboo-agent-home/lib/wrapper.jar
Installing file: /generic/lib/bamboo-agent-bootstrap-jar-with-dependencies.jar to: /root/bamboo-agent-home/lib/bamboo-agent-bootstrap.jar
Installing file: /arch/linux/x86_64/wrapper to: /root/bamboo-agent-home/bin/wrapper
Error invoking chmod commandString
java.io.IOException: Cannot run program "chmod": error=13, Permission denied
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
.#truncated the call stack 
at com.atlassian.bamboo.agent.installer.AgentInstaller.main(AgentInstaller.java:91)
Caused by: java.io.IOException: error=13, Permission denied
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 9 more
```

Also , please note that this error is agonstic to JDK used. I tried switching between JDK 1.8 and the Java 14 JDK on Bamboo agent - but this error remains the same across JDKs


Answers:
author: yogesh_devi
body: I could resolve this with following sequence although sadly I am unable to nail the exact reason that was causing this error -

1 ) Completely remove the old bamboo agent home ( old home directories are cause of most problems - and make sure the old home does not exist in any path )

2) Make sure you use right supported version JDK ( in my case ) -

java version "1.8.0_60" - Earlier I had used JDK14 that isnt supported

3) Make sure you are using the appropriate jar

4) Specify the bamboo agent home explicitly in the registration command using the -Dbamboo.home ( The default command displayed does not include this option) -

java -jar -Dbamboo.home=/home/bamboo/bamboo-agent-home atlassian-bamboo-agent-installer-7.1.1.jar <https://atlproxy.ucalabs.com/bamboo/agentServer/>

5) Run this as a bamboo user with right shell ( I used bash to make it work )
Connect my GitHub or BitBucket repository
Asked by Abou-Zeid Gerdi:

I have downloaded the trial version of bamboo 7. I am not able to start to create a plan due Repository Connection failure "We couldn't connect to the repository. Here's what we got back"  
Git credentials storage exception.  
I have tried all posibilities, nothing help.

I need your help


Answers:
author: Abou-Zeid Gerdi
body: i have already found a solution. I have added an executable entry as ssh to the git Server capability.

comments: author: Yang Li
body: I have the same issue, can you elaborate how to add an executable entry as ssh to the git Server capability.

As I've tried to add public key to SSH keys and connect Github via SSH, but it doesn't work.
How can I export all bamboo plan's java specs in bulk or via API so I can search through Tasks?
Asked by jzajac2:

How can I export all bamboo plan's java specs in bulk or via API so I can search through Tasks?

So yes, the general problem I am trying to solve is to be able to 'search' through Tasks (the name AND the content of, for example, Script tasks (but any type really..) for keywords. The Bamboo REST API does not seem to have any resources for getting at Tasks. I can search on stages and that gets me part of what I want, for example:

bamboo/rest/api/latest/search/stages/{planKey}?{keywords}

However I need to find out information on Tasks: which Tasks are named with or has script code containing keywords.   

If not via the REST API, is there something with Tasks API or Java API? Or even a SQL select query against the DB?


Answers:
author: Robert W
body: You can export the build plans project by project using the following GET api call:
>
> ```
>
> http://myhost.com:8085/rest/api/latest/project/{projectKey}/specs
>
> ```

[Bamboo API Documentation - get project Specs](https://docs.atlassian.com/atlassian-bamboo/REST/7.1.1/#d2e3892)

Once you have exported the specs from a project, you can then search through the code for a particular type of task, or keyword.

An example Script Task:

```

new ScriptTask()
.description("Upload to S3")
.inlineBody("#!/bin/bash\nexport AWS_ACCESS_KEY_ID=${bamboo.awsAccessKeyId}\nexport AWS_SECRET_ACCESS_KEY=${bamboo.awsSecretAccessKeyPassword}\nexport AWS_DEFAULT_REGION=us-east-1\n\n# aws s3 rm s3://<bucket-name>/path/to/file.ext\n/usr/local/bin/aws s3 cp file.ext s3://<bucket-name>/path/to/file.ext --acl public-read\n\necho \"uploaded to https://s3-us-west-2.amazonaws.com/<bucket-name>/path/to/file.ext\""),
```

comments: author: Hien
body: Hi Atlassian Team,

I am using version 6.10.3 and I have the need to export Java Specs from build plans and deployment projects. Is that possible?

What are **package** and **format** as in:

### /project/{projectKey}/specs?package\&format {#toc-hId-1946921622}

what are the possible values that I can use?

Could you please provide an example on how to export Java Specs from a build plan and from a deployment project?

Thanks
Start_crowd.sh script does not run
Asked by David Peter:

Start_crowd.sh script does not run


Answers:
author: David Peter
body: Duh...

bash start_crowd.sh


author: David Peter
body: Linux Ubuntu machine

I have Confluence loaded and running successfully, Java..

Can't get to the Crowd wizard

installed directory: /usr/lib/crowd/atlassian-crowd-2.6.4

when I run 'start_crowd.sh' from the 'CROWD_INSTALL) directory I get the messge:

start_crowd.sh script does not run


author: David Peter
body: Linux Ubuntu machine

I have Confluence loaded and running successfully, Java..

Can't get to the Crowd wizard

installed directory: /usr/lib/crowd/atlassian-crowd-2.6.4

when I run 'start_crowd.sh' from the 'CROWD_INSTALL' directory I get the messge:

start_crowd.sh : command not found

I can see teh script in the current directory via ls -l


Tags: crowd-administration
What is the best way to configure directories in Crowd?
Asked by KMcKenzie:

We are running Crowd with Jira, Fisheye and Crucible in our company with about 500-1000 users.

What are the best practices in configuring Crowd directories to control authentication to each application? We are using a delegated authentication directory and will have many users needing access to all applications and many different groups.

Would it be best to create ***one*** Crowd directory containing all of the users/groups for each application ex.

* Company directory
  * jira-users
  * jira-administrators
  * jira-developers
  * fisheye-users
  * fisheye-administrators
  * fisheye-developers
  * crucible-users
  * crucible-administrators
*
  * crucible-developers

\~OR

Create a ***separate***Crowd directory for each application ex.

* Jira directory
  * jira-users
  * jira-administrators
  * jira-developers
* Fisheye directory
  * fisheye-users
  * fisheye-administrators
  * fisheye-developers
* Crucible directory
  * crucible-users
  * crucible-administrators
  * crucible-developers

Also we will be using SSO-- is this configurable with both options?

Thanks!


Answers:
author: Dave Theodore [Coyote Creek Consulting]
body: I thik it really boils down to how users will use the various tools. If everyone will use everything and can see everything, I'd keep things simple and use the same group to control similar access on all tools. For example, create a "users" group, dump everyone in there and grant the "users" group permissions to log in and do basic functions on each application. If you have more distinction with your userbase, you might need to break things up as you suggest. I see companies that do this both ways. It just depends on your license and security situation. I'm in favor of not adding complexity for complexity's sake, personally.


author: Shun Hirayanagi
body: If your situation permits, I recommendone Crowd directory as Dave mentioned. If you have multiple Crowd directories, you have to add a user who will use all of Jira, Fishehe and Crucible into each directory. It's a troublesome task.  

You can also use multiple Crowd directories in order to use multiple directory types. For example, one direcory is LDAP Delegated Authentication and another is Crowd Internal Directory.

comments: author: KMcKenzie
body: Thanks Shun!

Will all of the groups within that directory show up in each application?

If so, does that count towards the license limit in the application?


author: Peter Van de Voorde
body: Yes all groups will show up in each application.

But only the people who can actually log into your application count towards your license limit.

Best regards,

Peter


Tags: crowd-administration
Users Report?
Asked by Kit Plummer:

I'm hoping to get a report out of Crowd, listing all users and their attributes. Really I only want one attribute, a custom one. Is there an easy way to do this?


Answers:
author: BernardoA
body: Can you please clarify which attributes do you whish? Actually Crowd does not generate reports but I guess you can try export a CSV file informing all users as explained here:

<https://confluence.atlassian.com/display/CROWD/Importing+Users+from+CSV+Files>

Also, you can run this sql query at Crowd database to list all your crowd users:

select \* from cwd_user

Cheers,

Bernardo


author: Amalia
body: I have not tested this yet, but perhaps you may try Crowd REST API to get these data that you require: <https://developer.atlassian.com/display/CROWDDEV/Crowd+REST+APIs>


author: Kit Plummer
body: It's a custom attribute. I've been able to get the data from a SQL query...not optimal, but I guess it is what it is.


Tags: crowd-administration