https://signoz.io logo
Title
s

Samyak Sarnayak

02/02/2023, 5:12 AM
How do I add values from my alert query as a label? I tried
value:{{value}}
but that did not work. Is there any another way to display the values in the alert being sent?
a

Amol Umbark

02/02/2023, 5:34 AM
we support both go template and $labels or $value notations like prometheus. example: {{.Labels.serviceName}} {{$labels.serviceName}} for value try {{$value}} the result of alert query will be populated in value
s

Samyak Sarnayak

02/02/2023, 10:08 AM
Where does this go? In the alert channel configuration?
a

Amol Umbark

02/02/2023, 11:37 AM
when you create alert rule. you can see labels section.
image.png
s

Samyak Sarnayak

02/03/2023, 3:39 AM
Got it. Thank you!