Understanding Signoz Alert Template Namespace Variables

TLDR Rod was seeking info on using variables in Signoz's Alert template namespace. Srikanth explained the format and mentioned necessary updates to the documentation which Chitransh SigNoz took up.

Photo of Rod
Rod
Sun, 15 Oct 2023 23:51:23 UTC

Hi All - I am demo'ing Signoz to my company and cant find Documentation on the variables that can be used in the Alert template namespace ? It doesnt seem to match the query, {{$serviceName}} comes up as not found for example.

Photo of Srikanth
Srikanth
Mon, 16 Oct 2023 03:03:18 UTC

It should be of the format `{{.Labels.serviceName}}`. <@4K148a>, we should get this added to the docs.

Photo of Rod
Rod
Mon, 16 Oct 2023 03:04:28 UTC

Thanks!, is there a list of all the ones available ? I cant find that either

Photo of Srikanth
Srikanth
Mon, 16 Oct 2023 03:05:04 UTC

I may have misunderstood. What are trying to do?

Photo of Rod
Rod
Mon, 16 Oct 2023 03:05:27 UTC

no, you didnt misunderstnad - that was the info I needed

Photo of Rod
Rod
Mon, 16 Oct 2023 03:05:58 UTC

I also wondered if their is a "namespace" of things available in that template, beyond the ones I build in my query

Photo of Srikanth
Srikanth
Mon, 16 Oct 2023 03:07:19 UTC

There are some trivial `{{.Annotations.}}` like alertname etc.. but mainly the labels from query can be accessed with `{{.Labels.label_name}}`

Photo of Rod
Rod
Mon, 16 Oct 2023 03:07:44 UTC

are the Annotations listed anywhere

Photo of Srikanth
Srikanth
Mon, 16 Oct 2023 03:08:57 UTC

Unfortunately no

Photo of Rod
Rod
Mon, 16 Oct 2023 03:10:02 UTC

Ok, thanks.

Photo of Srikanth
Srikanth
Wed, 18 Oct 2023 03:04:55 UTC

Chitransh SigNoz we should get our docs updated for this.

Photo of Chitransh SigNoz
Chitransh SigNoz
Wed, 18 Oct 2023 03:58:05 UTC

Srikanth can you please point out where in our docs this should be updated ?

Photo of Srikanth
Srikanth
Wed, 18 Oct 2023 06:32:35 UTC

Here

Photo of Chitransh SigNoz
Chitransh SigNoz
Thu, 19 Oct 2023 06:15:54 UTC

Cool. Created an issue . Will work on it.

Photo of Rod
Rod
Fri, 20 Oct 2023 05:48:38 UTC

thanks