On 22.08.25 08:48, 'Alexander Klump' via Prometheus Developers wrote: > from a use case where I wanted to see the expression which triggered the > alert in my slack template, I first used a workaround > (https://stackoverflow.com/questions/64007696/adding-alertmanager-expression-queries-while-alerting), > > but had the idea to > > *include the expression in the alert struct to send it to the receivers.* > > Since I liked to see how far I would get I played around and added it > myself on my forks: > - Prometheus: > https://github.com/prometheus/prometheus/compare/main...AlexanderKlump:prometheus:add-expression-as-field-to-alert-struct > - Alertmanager: > https://github.com/prometheus/alertmanager/compare/main...AlexanderKlump:alertmanager:add-expression-to-alert-structure?expand=1 > - Common: > https://github.com/prometheus/common/compare/main...AlexanderKlump:common:add-expression-field-to-alert-struct > > I got it working in the sense that Prometheus sends the expression field in > the json, Alertmanager ingests it and one can use the expression in a > reiver template. > > Before I fine tune it (and check the tests) and add a PR, I wanted to ask > if you think this is a valuable change (seems somehow big to me, and maybe > there was a good reason to not include it)
This recent discussion at the dev-summit might be relevant: https://docs.google.com/document/d/1uurQCi5iVufhYHGlBZ8mJMK_freDFKPG0iYBQqJ9fvA/edit?pli=1&tab=t.0#bookmark=kix.eb5vjy241s96 tl;dr: It needs a design doc. (See https://github.com/prometheus/proposals ) -- Björn Rabenstein [PGP-ID] 0x851C3DA17D748D03 [email] bjo...@rabenste.in -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/prometheus-developers/aLawdBjhcGDMiuFv%40mail.rabenste.in.