Skip to main content

Webhook

DBmarlin can send alert notifications to a Webhook endpoint.

info

The Webhook integration requires v5.11 of DBmarlin.

Configuration in DBmarlin Settings​

To setup alert notifications to Webhook on the DBmarlin side, click Integrations and then Edit on the Webhook integration.

You can add a new integration or edit to change an existing one. Note that you can only have one Webhook integration defined.

  • The Webhook URL will be the endpoint you are sending to.
  • The DBmarlin URL will be the URL you use to access DBmarlin. This is used for clicking back into DBmarlin from inside the Webhook message.
  • Headers are HTTP request headers that will be sent with the request. You can have multiple headers or none depending on what the receiving system requires.
  • Content Template should be valid JSON and can use placeholders which will be substitute with values by the triggering alert. This is used for Instance alerts.
  • Host Content Template should be valid JSON and can use placeholders which will be substitute with values by the triggering alert. This is used for Host alerts.
  • You can optionally enable or disable the integration.

DBarlin Slack Edit Setting

Example Content Template​

This JSON shows the placeholders that can be used. It can be used like this or customized to a format that the webhook receiver would like, but must be valid JSON.

{
"body": {
"instance": "<datasourcename>",
"ruleid": "<ruleid>",
"rulename": "<rulename>",
"statistic": "<statistic>",
"startedended": "<startedended>",
"oldvalue": "<oldvalue>",
"newvalue": "<newvalue>",
"threshold": "<threshold>",
"units": "<units>",
"from": "<from>",
"to": "<to>",
"tz": "<tz>",
"url": "<url>",
"urlfrom": "<urlfrom>",
"urlto": "<urlto>",
"urltz": "<urltz>",
"interval": "<interval>"
}
}

Example Host Content Template​

This JSON shows the placeholders that can be used. It can be used like this or customized to a format that the webhook receiver would like, but must be valid JSON.

{
"body": {
"node": "<hostname>",
"ruleid": "<ruleid>",
"rulename": "<rulename>",
"statistic": "<statistic>",
"startedended": "<startedended>",
"oldvalue": "<oldvalue>",
"newvalue": "<newvalue>",
"threshold": "<threshold>",
"units": "<units>",
"from": "<from>",
"to": "<to>",
"tz": "<tz>",
"url": "<url>",
"urlfrom": "<urlfrom>",
"urlto": "<urlto>",
"urltz": "<urltz>",
"interval": "<interval>"
}
}

Receiving notifications​

Once configured you should see new alerts arrive at the Webhook endpoint.