Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,714
Community Members
 
Community Events
176
Community Groups

What are the variables I send through webhooks when using the "agent online" system notification

Hello,

There are "System Notifications" for the events "Agent Online" and "Agent Offline". We can choose Webhooks as "Recipient Type" and then select a Webhook Template.

I'm not finding anywhere which variables I can send in the body as a POST request when using a Webhook Template. For instance I'm interested in the agent name. I'm mean, if the agent is online, then I would like to know at least it's name. : )

Has anyone been able to achieve this somehow?

 

ps. I was able to set a custom capability on the agent:

"my.name" = "${HOSTNAME}"

Then I've created a template like:

{
"uuid" : "${bamboo.webhook.uuid}",
"hostname" : "${bamboo.capability.my.name}"
}

I get a "variable not found" in the logs.

1 answer

Looks like the webhook does not get the capabilities from the agent but only the local ones(from Bamboo Host/Server/DC). For instance, let's say I have a server capability called:

TEST=ABC

But this capability does not exist in the agent. If I try to use it in the webhook:

${system.capability.TEST}

Then I will get the value "ABC". If the variable does not exist in the server but exists in the agent I get a "variable not found".

I'm not sure if this is a BUG or it is how it's supposed to work. I mean, we have an event called "Agent Online" but when I try to use the Webhook as a recipient type, it does not receive any data from the agent.

If so, it would be good to have the recipient type Webhook removed from the list of possible options. : (

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events