alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

TruncatedAlerts is unusable?

Open chrisleavoy opened this issue 7 months ago • 1 comments

Running: amtool template render --template.glob="*.tmpl" --template.text='{{ .TruncatedAlerts }}'

Results in an error: amtool: error: template: :1:3: executing "" at <.TruncatedAlerts>: can't evaluate field TruncatedAlerts in type template.Data

Expect: output of 0

I can't seem to figure out how to invoke TruncatedAlerts after it was added in https://github.com/prometheus/alertmanager/pull/2274

chrisleavoy avatar Jun 10 '25 16:06 chrisleavoy

You can't access this field, it belongs to a different struct that lives outside of templating.

grobinson-grafana avatar Jun 10 '25 19:06 grobinson-grafana

Closing as not an issue.

siavashs avatar Nov 10 '25 16:11 siavashs