Webhooks are used to integrate external applications with TrendMiner to initiate actions not normally conducted within TrendMiner. This feature is an option that can be found under the Monitor option in the TrendHub menu.
Webhook monitoring uses trigger based urls (webhooks) taken from third party applications such as built.io and webmethods. By providing a webhook, TrendMiner can perform HTTP calls to your specific url whenever a monitor triggers. These calls can, for example, be used in the automated workflows that run in your selected third party applications. For each monitor result, TrendMiner will send out 2 calls to the webhook: one when the search criteria are met and one when the search result ends.
Why use web hook monitoring?
Increased automation of workflows.
Under normal circumstances your data historians communicate with TrendMiner, but TrendMiner does not communicate back. Webhook monitoring enables TrendMiner to speak back enabling the integration of TrendMiner with any third party applications you use in your day to day business.
For example, if TrendMiner detects that storage levels are low in a monitored tank, TrendMiner's monitoring facility when equipped with a webhook could communicate this to another application which automatically generates a product order document which is sent directly to procurement.
Without webhook monitoring this process would be a lot more manual.
How to use webhooks
As an administrator
- Goto TrendHub tool menu.
- Click on the settings icon (cog).
- Click on feature management.
- Click the toggle for "Monitoring webhook notification" so it highlights green.
As an end user
- Ensure you have a third party url to use as a webhook.
- Prepare a search or fingerprint for purposes of a monitor.
- Goto the TrendHub tool menu and click on the monitoring icon .
- Identify your chosen monitor and click on the associated toggle so it highlights green.
- Scroll down the bottom of the Monitor & Alerts settings page
- Click the checkbox on, and enter your webhook url.
- Click on the save button.
The response of the webhook will be a JSON object which looks as follows:
"searchDescription":"Description of my value based search" ,
"searchName": "My value based search",
The resultScore key will only be present for similarity search based monitors. For each monitor, two webhook calls will be performed, one for the initial trigger of the monitor and one for the end of the search result. The webhookCallEvent key will be equal to start or end, respectively.
The resultStart and resultEnd key indicate the start and end times of the detected monitor result, while the webhookCallTime indicates the time the webhook call was sent. All timestamps are formatted as UTC time.