Knowi's Alerts allows you to stay on top of important changes in your business in a centralized location to drive actions. With Alerts, you can enhance data management by monitoring query execution, receive real-time notifications when certain thresholds and conditions are met, or when anomalies are detected within your data.
For example- let's assume you have a widget tracking Apple's stock price that includes a date field and daily close price.
Let's say you'd like to generate an alert when the stock price at Close exceeds 160.00. You can create an alert based on this threshold and have it sent to you via email/webhook/Slack when the condition is triggered, including the results of your condition.
There are three main alert types you can configure depending on your use case. The sections below will guide you through setting up and managing them.
For datasets that use the ElasticStore to track results, use Data Update Alerts to raise alerts when the data is not updated upon an expected interval. For example- if a query didn't execute as scheduled, this will trigger an alert that can be sent via email/webhook/Slack.
This outlines initial steps to create the alert.
Adding Filters: Users can add filters to the query. Click + to add a filter and - to remove. There are two modes to choose from: Query Parameter and Filter on Query Results.
Query Parameter - Applicable for "Direct Query" modes, the parameters selected will be automatically passed on to this user. The field name must be in the format $c9_XXX$ or $c9_XXX(defaultVal)$, where the default value will be passed at runtime if the value is empty. To add multiple values, add the value and hit enter.
Filter on Query Results - Applies the filter on top of the query results to limit the data. The field name is the field name to filter by (without $c9_). Enter the value, data type, and operation type.
Follow these steps to notify users of a query failure.
Adding Filters: Users can add filters to the query. Click + to add a filter and - to remove. There are two modes to choose from: Query Parameter and Filter on Query Results.
Query Parameter - Applicable for "Direct Query" modes, the parameters selected will be automatically passed on to this user. The field name must be in the format $c9_XXX$ or $c9_XXX(defaultVal)$, where the default value will be passed at runtime if the value is empty. To add multiple values, add the value and hit enter.
Filter on Query Results - Applies the filter on top of the query results to limit the data. The field name is the field name to filter by (without $c9_). Enter the value, data type, and operation type.
Tokens:
%QUERY_ERROR_MESSAGE%: Returns the query error message %QUERY_ERROR_STACK_TRACE%: returns the query error stack trace as a string.
Note: This is available for non-direct queries only
Email Alerts allows you to send the alert via email along with a CSV attachment of results to a list of recipients.
To set up an Email Alert:
Webhook Alerts allow you to send an alert directly to your application (or third party applications). We'll send a POST request with a JSON payload of the data, which you can use to drive actions within your application.
The data in the POST will be a JSON formatted dataset of the full raw dataset for which the alert is generated.
To set up a Webhook Alert:
Under Alert Actions, select Webhook and click on the + Add Webhook to open the Add Webhook window.
Under Name, enter the name of the webhook.
Under URL to Invoke, enter the endpoint in your application that can accept a post request with JSON (Array of Objects). For example: https://webhook.site.
Under the Authentication URL, enter the authentication endpoint to get a token, which can be passed into each subsequent query. Only required if the API requires it. This is an absolute URL.
Under Headers, enter any headers for HTTP requests to the URL to Invoke endpoint. There can be one header per line.
Knowi also provides the following C9 tokens which can be used to identify the report on the Webhook headers.
Under Auth Headers, enter any optional authentication-related headers. One header per line.
Under the Custom POST Body, the user can pass data tokens through the webhook using the POST Body field. Enter a custom post body to be sent out. Data tokens can pass field values from data. If left empty, the post body for the webhook will contain the conditional data saved as JSON or just a default message with the dataset name triggered.
For example,
For sending activity samples, we can type %opened% or %customer%, etc., and it will be replaced with the value of the fields of the first row of triggered data.
Note: The data of token only can pass first record of triggered alert/report data (or conditional data alerted)
Click Save.
Click Test Run (optional) to send a test webhook alert to the chosen application. Here is an example of the results in JSON form:
Once configuration is complete, click Save.
Slack integration allows you to trigger actions in your Slack channel(s) for a given condition triggered by an alert. When the condition is triggered, we'll send a message to a predefined channel(s) including the attachment of full data or conditional data depending on the options selected.
To set up a Slack Alert:
Click Test Run (optional) to send a test Slack alert to the chosen channel(s). Here is how the Alert will show up in you Slack channel:
Once configuration is complete, click Save.
MS Teams integration allows you to trigger actions in your Teams channel(s) for a given condition triggered by an alert. When the condition is triggered, we'll send a message to a predefined channel(s) including the attachment of full data or conditional data depending on the options selected.
To set up a Teams Alert:
Trigger Notifications allows you to set powerful triggers on your datasets to drive actions based on a custom condition you specify. The notifications along with results can be sent via email/webhook/Slack.
This outlines initial steps to create the alert.
In The condition * section, use Cloud9QL in the query editor to create the trigger condition on top of your dataset:
Click Use Query to use the query you have
Adding Filters: Users can add filters to the query. Click + to add a filter and - to remove. There are two modes to choose from: Query Parameter and Filter on Query Results.
Query Parameter - Applicable for "Direct Query" modes, the parameters selected will be automatically passed on to this user. The field name must be in the format $c9_XXX$ or $c9_XXX(defaultVal)$, where the default value will be passed at runtime if the value is empty. To add multiple values, add the value and hit enter.
Filter on Query Results - Applies the filter on top of the query results to limit the data. The field name is the field name to filter by (without $c9_). Enter the value, data type, and operation type.
Email Alerts allows you to send the alert via email along with a CSV attachment of results to a list of recipients.
To set up an Email Alert:
Webhook Alerts allow you to send an alert directly to your application (or third party applications). We'll send a POST request with a JSON payload of the data, which you can use to drive actions within your application.
The data in the POST will be a JSON formatted dataset of the full raw dataset for which the alert is generated.
To set up a Webhook Alert:
Under Alert Actions, select Webhook and click on the + Add Webhook to open the Add Webhook window.
Under Name, enter the name of the webhook.
Under URL to Invoke, enter the endpoint in your application that can accept a post request with JSON (Array of Objects). For example: https://webhook.site.
Under the Authentication URL, enter the authentication endpoint to get a token, which can be passed into each subsequent query. Only required if the API requires it. This is an absolute URL.
Under Headers, enter any headers for HTTP requests to the URL to Invoke endpoint. There can be one header per line.
Knowi also provides the following C9 tokens which can be used to identify the report on the Webhook headers.
Under Auth Headers, enter any optional authentication-related headers. One header per line.
Under the Custom POST Body, the user can pass data tokens through the webhook using the POST Body field. Enter a custom post body to be sent out. Data tokens can pass field values from data. If left empty, the post body for the webhook will contain the conditional data saved as JSON or just a default message with the dataset name triggered.
For example,
For sending activity samples, we can type %opened% or %customer%, etc., and it will be replaced with the value of the fields of the first row of triggered data.
Note: The data of token only can pass first record of triggered alert/report data (or conditional data alerted)
Click Save.
Click Test Run (optional) to send a test webhook alert to the chosen application. Here is an example of the results in JSON form:
Once configuration is complete, click Save.
Slack integration allows you to trigger actions in your Slack channel(s) for a given condition triggered by an alert. When the condition is triggered, we'll send a message to a predefined channel(s) including the attachment of full data or conditional data depending on the options selected.
To set up a Slack Alert:
MS Teams integration allows you to trigger actions in your Teams channel(s) for a given condition triggered by an alert. When the condition is triggered, we'll send a message to a predefined channel(s) including the attachment of full data or conditional data depending on the options selected.
To set up a Teams Alert:
Widget Alerts enable you to set up alerts directly on a widget based on a threshold, anomaly detected, or custom condition in your data and have the alert along with results sent via email/webhook/Slack.
To get started, navigate to the widget you want to create an alert for and click the Add/Remove Alert Icon.
Time-series anomaly detection is used to identify unusual patterns that do not conform to expected behavior, called outliers. This alert notifies you when such anomalies are detected within your data.
These are additional options to configure your Alert. Check the Advanced Settings box to expand the menu.
This section will walk you through setting up Alert notifications for Widget Alerts.
Email Alerts allows you to send the alert via email along with a CSV attachment of results to a list of recipients.
To set up an Email Alert:
Users have the ability to specify the c9_date token in the alert email subject and body in the following format:
{$c9_
For example, {$c9_today-1d:YYYYMMdd} will be translated automatically to yesterday.
If the format is not specified (YYYYMMdd in the example above) - then the default user date-time format is applied.
For more information on supported date tokens and time units, you can refer to the Date Tokens section of our documentation.
Webhook Alerts allow you to send an alert directly to your application (or third party applications). We'll send a POST request with a JSON payload of the data, which you can use to drive actions within your application.
The data in the POST will be a JSON formatted dataset of the full raw dataset for which the alert is generated.
*To set up a Webhook Alert:
Under Alert Actions, select Webhook and click on the + Add Webhook to open the Add Webhook window.
Under Name, enter the name of the webhook.
Under URL to Invoke, enter the endpoint in your application that can accept a post request with JSON (Array of Objects). For example: https://webhook.site.
Under the Authentication URL, enter the authentication endpoint to get a token, which can be passed into each subsequent query. Only required if the API requires it. This is an absolute URL.
Under Headers, enter any headers for HTTP requests to the URL to Invoke endpoint. There can be one header per line.
Knowi also provides the following C9 tokens which can be used to identify the report on the Webhook headers.
Under Auth Headers, enter any optional authentication-related headers. One header per line.
Under the Custom POST Body, the user can pass data tokens through the webhook using the POST Body field. Enter a custom post body to be sent out. Data tokens can pass field values from data. If left empty, the post body for the webhook will contain the conditional data saved as JSON or just a default message with the dataset name triggered.
For example,
For sending activity samples, we can type %opened% or %customer%, etc., and it will be replaced with the value of the fields of the first row of triggered data.
Note: The data of token only can pass first record of triggered alert/report data (or conditional data alerted)
Click Save.
Click Test Run (optional) to send a test webhook alert to the chosen application. Here is an example of the results in JSON form:
Once configuration is complete, click Save.
Slack integration allows you to trigger actions in your Slack channel(s) for a given condition triggered by an alert. When the condition is triggered, we'll send a message to a predefined channel(s) including the attachment of full data or conditional data depending on the options selected.
Teams integration allows you to trigger actions in your Teams channel(s) for a given condition triggered by an alert. When the condition is triggered, we'll send a message to a predefined channel(s) including the attachment of full data or conditional data depending on the options selected.
All alerts are managed in a central location in the Alerts Management screen. From the dashboard, click on the Alerts icon on the left side panel.
You can create new alerts in Alerts Management by clicking the Add Trigger Notification + or Add Data Update Alerts + orange icons. Note that Widget Alerts must be created on the widget themselves.
The list of Alerts you have created are listed here, along with details about the alert. You can also edit, share, clone, or delete alerts here.
You can edit an alert by clicking the pencil icon on the right side of each alert listing.
To clone an alert:
The cloned alert will now appear in the Alert list
To delete an alert:
You will be asked to confirm if you want to delete the alert. To proceed, click OK
You can stop receiving an alert from Knowi temporarily. Whenever you need the alert, you can unpause it.
To pause an alert:
You will be asked to confirm if you want to pause the alert. To proceed, click OK
You can explicitly share an alert with another user. Note that sharing is only available to users who have full access rights to the dataset being used for the alert.
To share an alert:
In the dropdown, select the user(s) to share the alert to Click Share
In Alerts Management, you also see a list of all the Webhook, Slack & Teams alerts you've created. You can edit each entry by clicking the pencil icon on the right hand side of each line. You can also delete an entry by clicking the Delete icon.
For alerts sent via email, you have the option to write custom HTML to customize the body of the email template. The body can contain the dynamic tags below:
%DATASET_NAME%
%ALERT_CONDITION%
%ALERT_HUMAN_READABLE_CONDITION%
%DATASET_LAST_UPDATE%
%COLUMN_NAME%
%DATA_CSV%
%DATA_JSON%
%QUERY_ERROR_MESSAGE%
%QUERY_ERROR_STACK_TRACE%
For example, using the default HTML payload template for a Trigger Notification Alert:
Will produce an email alert body that looks similar to the image below: