Re: [prometheus-users] Re: Go client for parsing Alertmanager config file?

2021-11-23 Thread Julien Pivotto
On 23 Nov 08:09, Matthias Rampke wrote: > The alertmanager's own structs are here: > https://pkg.go.dev/github.com/prometheus/alertmanager/config but keep in > mind that this isn't primarily intended as a library, so you may or may not > be better off vendoring them. Alertmanager structs can't re

Re: [prometheus-users] Re: Go client for parsing Alertmanager config file?

2021-11-23 Thread Matthias Rampke
The alertmanager's own structs are here: https://pkg.go.dev/github.com/prometheus/alertmanager/config but keep in mind that this isn't primarily intended as a library, so you may or may not be better off vendoring them. /MR On Tue, Nov 23, 2021 at 8:02 AM Brian Candler wrote: > It's just YAML,

[prometheus-users] Re: Go client for parsing Alertmanager config file?

2021-11-23 Thread Brian Candler
It's just YAML, so any library which parses and/or generates YAML should do. In fact, some people just generate YAML with a plain text templating language (this is what Helm charts do). It's a bit ugly and brittle, but if all you're doing is appending some receivers to an alertmanager config,