Yes: the source code for prom2teams is on github, and you can follow that.

You cannot change the payload in the webhook *as it is sent by 
Alertmanager*. Hence you need to run a piece of software which will receive 
the alertmanager webhook, change the contents, and then resend it to the 
final destination.  Just like prom2teams does.

On Tuesday, 28 June 2022 at 19:36:21 UTC+1 [email protected] wrote:

> Sorry for asking multiple times, can I have an example of how to pass the 
> payload in the webhook for the  post request or any POST-WEBHOOK JSON 
> example
>
> On Tuesday, June 28, 2022 at 5:52:03 AM UTC-4 Brian Candler wrote:
>
>> AFAIK, alertmanager webhook JSON is fixed.  If you want to send something 
>> else, then you have to write your own webhook receiver which receives the 
>> request from alertmanager and then reformats it and resends it to the 
>> upstream service.
>>
>> Have a look at other projects which already do this, e.g. prom2teams
>>
>> On Monday, 27 June 2022 at 21:23:32 UTC+1 [email protected] wrote:
>>
>>> Hi All,
>>>
>>> I need help to append my JSON to the below webhook
>>> receivers:
>>> - name: "webhook_sample"
>>>     webhook_configs:
>>>     - url: '<webhook url>'
>>>       send_resolved: true 
>>>       http_config:
>>>         basic_auth:
>>>           username: <username>
>>>           password: <pwd>
>>>
>>> I want to append the below JSON to the above receiver
>>>
>>> {
>>>    "request": {
>>>       "entry": {
>>>          "u_description": " description2",
>>>          "u_work_notes": " work notes",
>>>          "u_assignment_group": "APM Team",
>>>          "u_impact": "2",
>>>          "u_urgency": "2"
>>>       }
>>>    }
>>> }
>>>
>>> could someone please help with this?
>>>
>>> Regards,
>>> Venkat
>>>
>>

-- 
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/07c9055e-1d3f-491e-8747-29eb926662aen%40googlegroups.com.

Reply via email to