Thanks a lot, Chris for your valuable and informative feedback.


On Fri, Nov 17, 2023 at 9:35 PM Chris Siebenmann <
cks.prom-users...@cs.toronto.edu> wrote:

> > Hi All , we have rancher based setup . We are receiving webhook payload
> > from alertmanager, but alarms are not generating at webhook due to
> format
> > issue.
> >
> > For example we need to remove \
> > Here we need
> > *severity=warning*, instead of *severity=\"warning\"}",*
> > *Can we update the payload jason at rancher alertmanager?      *
>
> The short answer is 'no', because what you want is not valid JSON
> syntax. Whatever webhook receiver you're using needs to be able to
> process JSON, including JSON strings. You can see examples of the
> Alertmanager JSON for alerts in, for example:
>
> https://gist.github.com/mobeigi/5a96f326bc06c7d6f283ecb7cb083f2b
> https://www.puppeteers.net/blog/testing-alertmanager-webhooks-with-curl/
>
> In JSON alerts, the value of labels are strings, which means that in the
> raw JSON they always have quotes around them because this is the JSON
> string format.
>
> Since you seem to be using something to transform the JSON to another
> format (the raw JSON does not have eg 'severity="warning"'), it seems
> likely that this other component is what needs to be fixed and updated.
>
> (The overall JSON format is documented in
> https://prometheus.io/docs/alerting/latest/configuration/#webhook_config
> but you need to know a certain amount of JSON to understand what eg
> '<object>' means here.)
>
>         - cks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAPu_0s2kVptWbg7e5X22UPVgoHybnSXmpgmNKiJTEm4m5nd5cw%40mail.gmail.com.

Reply via email to