Re: [prometheus-users] Alertmanager and use of fields/labelshook revceiver

8 views
Skip to first unread message

Stuart Clark

unread,
Apr 18, 2020, 4:31:12 AM4/18/20
to Danny de Waard, Prometheus Users
On 17/04/2020 09:31, Danny de Waard wrote:
> I want to use a webhook to trigger a script with 3 variables.
> These are
> - severity
> - host
> - trigger
>
> And i want them used in my webhook like:
> http://127.0.0.1:9000/hooks/sm9-inc?severity='critical'&host='lsrv0008'&trigger='high_cpu'
>
> How can i get the fields in the webhook config?
>
>   - name: 'webhook'
>     webhook_configs:
>       - url: 'http://127.0.0.1:9000'


The webhook receiver sends data in a particular fixed format. You either
need to adjust your endpoint to accept that format or create an
intermediate endpoint that converts to the format you are wanting.


--
Stuart Clark

Reply all
Reply to author
Forward
0 new messages