Although Icinga2 is releasing its own webhook manager in the form of Icinga Notifications, that is not yet considered ready for production use. This is an example of writing a webhook wrapper as a notification command for Icinga, in this case in order to support Grafana's IRM pager service.
For best results, use a Formatted Webhook in Grafana IRM, rather than the standard webhook.
The attached conf file is Icinga2 specific. The python script might work with other Nagios-style monitoring systems, but I haven't tested it.