Managed Solr Webhooks – SearchStax


Overview

SearchStax® can POST Heartbeat and Threshold Alerts to the webhook endpoints of external Alerting and Incident Management systems.

The webhook messages are invoked by Heartbeat and Threshold Alerts, and can carry a payload of data about the alert and the system that triggered it.

Contents of this page:

What is a Webhook?

Webhooks are user-defined HTTP callbacks. They are usually triggered by some event, such as an alert changing status in SearchStax. When the event occurs, the source site (SearchStax) makes an HTTP request to the URL configured for the webhook. Events on one site can invoke behavior on another.

A common use is to notify bug-tracking systems and alerting systems, although the SearchStax webhook mechanism can reach out to any web application that has a webhook endpoint.

Defining a Webhook

A webhook must be defined in the SearchStax Dashboard before it can be referenced in an alert. Look for the Webhooks entry in the navigation pane on the left margin of the page.

SearchStax Webhooks

Click the Create Webhook button to open the webhook editor.

SearchStax Webhooks
ControlDescription
NameThe name of the webhook. It will appear in a droplist of webhooks in the alerts editor.
URLThe URL of the webhook endpoint of the target application.
Ignore SSL ValidationSometimes the target of your webhook post is using SSL with a self-signed certificate. This setting overrides the certificate check.
PausedDeactivate this webhook without having to delete it.
PayloadThe payload is a JSON list of field keys and values. The fields are the labels expected by the target application. The values are predefined SearchStax variables. The list must be flat with no nested JSON objects.
UpdateThe Update button saves the webhook and closes the editor.

Adding Webhooks to an Alert

The alert editor offers droplists that let you associate your webhooks with specific alerts.

SearchStax Webhooks
Note that you can send one webhook when the alert is triggered, and then send a different webhook when the alert is closed.

Predefined Variables

SearchStax email alerts report various internal values to the user. These values are available as predefined variables to put into the payload of the webhook.

VariableDescriptionExample
$ALERT_CURRENT_VALUEThe current value of the metric.“0.01”
$ALERT_IDThe internal ID number of the alert.“6012”
$ALERT_METRICThe name of the alert metric.“os.SystemCpuLoad”
$ALERT_STATUSOpen or closed.“OPEN”
$ALERT_THRESHOLD_VALUEThe threshold.“10.0”
$ALERT_THRESHOLD_OPERATORThe relation between the current value and the threshold.“>”
$ALERT_TITLEThe name of the alert.“Server 5 below 10% CPU”
$ALERT_TYPEHeartbeat or Threshold.“Threshold”
$DATEThe time in UTC.“2019-12-20T18:18:39+00:00”
$DEPLOYMENT_NAMEThe name of the deployment.“Films”
$DEPLOYMENT_UIDThe ID number of the SearchStax deployment.“ss123456”
$HOSTNAMEThe name of the server that issued the alert.“ss123456-5”

Contact Us!

Don’t hesitate to reach out to the SearchStax Support Desk. We are happy to answer your questions.

Was this article helpful?
YesNo