Okay,

I'm using this webhook on my server: https://github.com/adnanh/webhook

If i read correctly you refer to the payload which should contain fields i 
can get from the payload.
Is this an example of such a payload?? And if so, how do i extract a field 
like instance from this?

Here is a example:

{
  "receiver": "webhook",
  "status": "firing",
  "alerts": [
    {
      "status": "firing",
      "labels": {
        "alertname": "Test",
        "dc": "eu-west-1",
        "instance": "localhost:9090",
        "job": "prometheus24"
      },
      "annotations": {
        "description": "some description"
      },
      "startsAt": "2018-08-03T09:52:26.739266876+02:00",
      "endsAt": "0001-01-01T00:00:00Z",
      "generatorURL": "
http://simon-laptop:9090/graph?g0.expr=go_memstats_alloc_bytes+%3E+0\u0026g0.tab=1
 
<http://simon-laptop:9090/graph?g0.expr=go_memstats_alloc_bytes+%3E+0%5Cu0026g0.tab=1>"
                                                                                
   

    }
  ],
  "groupLabels": {
    "alertname": "Test",
    "job": "prometheus24"
  },
  "commonLabels": {
    "alertname": "Test",
    "dc": "eu-west-1",
    "instance": "localhost:9090",
    "job": "prometheus24"
  },
  "commonAnnotations": {
    "description": "some description"
  },
  "externalURL": "http://simon-laptop:9093";,
  "version": "4",
  "groupKey": "{}:{alertname=\"Test\", job=\"prometheus24\"}"
}


Op vrijdag 17 april 2020 15:58:16 UTC+2 schreef Brian Candler:
>
> The labels like severity are in the JSON body: see 
> https://prometheus.io/docs/alerting/configuration/#webhook_config
>
> It carries a group of alerts, so there are "commonLabels" which are common 
> to them all, and "labels" which are distinct to each firing alert.
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/1308244d-75fb-4a25-aeb9-186182076598%40googlegroups.com.

Reply via email to