

The first step in consuming a webhook is giving the webhook provider a URL to deliver a request.

How do webhooks work? Consuming a webhook The webhook will make an HTTP request to your app (typically a POST), and then you’ll have to interpret it. Webhooks are sometimes referred to as reverse APIs because of the ability to give you what amounts to an API spec, and you must design an API for the webhook to use. The only drawback to webhooks is the difficulty of initially setting them up. This makes webhooks much more efficient for the provider and consumer. A webhook delivers data to other applications as it happens, meaning you get data immediately-unlike typical APIs where you would need to poll for data very frequently to get it in real time. So what exactly is a webhook? By definition, a webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. These are incredibly useful and a resource-light ways to implement event reactions. As more and more of what we do on the web includes events, webhooks are becoming even more applicable. Please leave a comment below to ask questions or share your own experiences.A webhook is an API concept growing in popularity. A quick and easy workaround for sending email notification for alerts defined on log data. If there are errors, they will be printed to the terminal window. If set up properly, the recipient will receive an alert notification via email when the alert fires (or when "Send test message" is clicked). You can click the link to "Send test message" to verify things are working as expected. The three dashes separate the headers from the message body. When the 'Message' box appears, you must add the email address where the alert is to be delivered in a 'to:' parameter inserted before the message body. Once you give the action a name, select the destination you created from the dropdown box. You only have to do things differently when it comes to configuring the actions. On the Create Trigger page, define the trigger's name and severity and review/validate the trigger condition and response as per normal. Mobile users: To view the images, select the "Full" version at the bottom of the page.Ĭlick Create to finish defining the destination, and move on to creating the trigger. Select any image to see a larger version.

A message is displayed indicating that the alerts handler is up and running. I picked a random port number, and entered my SMTP server's details. The odfe-alerts-handler is a docker image, so we start it with something like:ĭocker run -rm -p 30339:30339 youtous/odfe-alerts-handler -web.listen-address=":30339" -smtp.host="" -smtp.port=1025 fault-subject="ODFE has fired an alert" This handy little utility is essentially a web server that accepts a webhook containing email parameters as input, and connects to a mail server (connections for which are defined when the web server is started) to send a notification to an email address which is defined in the alert trigger in Kibana. All that is needed beyond a Viya deployment that has SAS Viya Monitoring for Kubernetes deployed, is a docker image called odfe-alerts-handler. This post outlines what I consider to be the simplest approach. While searching for a solution, I came across a couple of possible options.

Later versions of Elasticsearch, which will inevitably be incorporated into SAS Viya Monitoring for Kubernetes, do have an "email" destination type, so this functionality should become available eventually in any case without the need for this workaround. This approach is merely a workaround for delivering alert notifications via email in the absence of a suitable destination type in Kibana that allows the sending of emails natively. We'll be using another third party (open source) tool here, which isn't provided or supported by SAS, or included with SAS Viya Monitoring for Kubernetes. In this post, we'll look at a workaround, which will allow for notification emails to be distributed for log alerts. Rather, the options are limited to webhook, Slack and Amazon Chime. I also wrote about a limitation in the current version of Elasticsearch that ships with SAS Viya Monitoring for Kubernetes as at lts-2020.1), which does not allow alert notifications to be sent via email. In an earlier post I wrote about setting up alerts on SAS log data captured and stored by the logging components of the SAS Viya Monitoring for Kubernetes framework.
