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

Set Assets Custom Field with SmartValue from Alert

Josh Rossman August 2, 2024

Hello,

We are attempting to find a way to auto-populate our Assets Object custom field in an issue when an alert is linked. In a more basic form, I have created an automation rule that is fired from a manual trigger. This trigger creates an Incident and populates the Summary with {{alert.message}} and Description with {{alert.description}}. We have created a custom field called "Linked Device" that is used to track Hostnames of devices involved with the Incident.

I'm attempting to use {{alert.entity}} to auto populate the Linked Device field but am struggling. Are Smart Values valid within the Asset Objects custom field?

Capture.PNG

This works just fine at populating the Asset Object.

name = "hostname"

This does not.

name = "{{alert.entity}}" ........... or this name = {{alert.entity}}

Ultimately, I want any alert that is linked to an incident to always attempt to add its {{alert.entity}} value to the Asset Objects field. We allow multiple Objects within the field and this seems like a possibility.

Am I missing something within Automation to accomplish this? Is there an App available that would accomplish this easier? Automation is lacking a trigger like "alert linked". That would at least allow me to run automation rules each time an alert is linked.

 

Thanks Everyone!

 

2 answers

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2024

Hi @Josh Rossman 

What is the config of the asset field.

What are the values that you can get in a normal issue on the custom field of asset type?

Josh Rossman August 9, 2024

Marc,

I was actually able to solve this by using name = {{alert.extraProperties.entity}}.

Although my entity field within details was populated the Assets custom field would not reference it correctly. Since the entity field within Details does not show up within an alert by default you need to add it to extraProperties as well (referenced below.)

https://jira.atlassian.com/browse/JSDCLOUD-14561

I think this is the reason the assets field was unable to reference {{alert.entity}}.

Thanks!

Josh R.

Like Marc - Devoteam likes this
0 votes
Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 2, 2024

@Josh RossmanIf name = "{{alert.entity}}" don't work (but name = "hostname" does) can only mean that {{alert.entity}} don't hold a valid Linked Device name.

How do you configure that entity property for your alerts?

 

Josh Rossman August 5, 2024

The entity property is sent in the payload from our monitoring tools. For example, I was able to display the hostname via {{alert.entity}} in the description of an Issue. I know that part is pulling the hostname correctly. As soon as I try to place it within the Linked Device (Asset Object) field it's always left blank.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events