If you have the appropriate user permissions, you can create alerts on query-based or Look-linked tiles on user-defined dashboards or LookML dashboards.
Creating an alert
Alerts can be set only on tiles that have at least one numeric measure or table calculation in the tile's visualization. The visualization type and the fields that are present in the dashboard tile visualization determine whether you can set an alert condition that is based on a single field or table calculation value or on "any" field or table calculation value.
Depending on the dashboard tile's visualization type and the kinds of fields that are present in the visualization, Looker checks your data in different ways. When you create an alert, it will be one of these types:
- Single value alerts (used only with single value visualizations) — Looker checks the data based on the value that is used in the visualization, which is the first row of the results table.
- Time series alerts (used when there is a date or time dimension in the query results) — Looker checks all new rows that have not been seen before (based on the date or time dimension in the query).
- Categorical alerts (neither single value nor time series) — Looker checks all rows and pivot values unless a specific row or pivot value was selected when the alert was created.
Alerts that are based on a table calculation that includes a row total are not supported.
To create alerts, your dashboard must be out of edit mode and you must be out of Development Mode.
To create an alert on a dashboard tile, click the tile's bell icon and then click the New button at the bottom of the list of the existing alerts that you are permitted to see (you may need to scroll to see the entire list). If no alerts are configured for that tile yet, or if you don't have permission to see any existing alerts on that tile, hover over the dashboard tile to reveal the bell-shaped Alerts icon. Click the bell-shaped Alerts icon on the dashboard tile to open the alert creation dialog.
In the alert creation window, you can specify several components of your alert:
- Custom title
- Alert conditions
- Recipients
- Frequency
- Permissions (this setting is also dictated by whether the alert is configured to allow following)
Each alert query captures the dashboard and tile settings at the time the alert was created. However, an alert syncs with many of the common types of changes that you or other users make to its underlying dashboard or tile — without the need to recreate the alert. See the Effect of dashboard edits on alerts documentation page for more information.
Naming an alert
The default alert title indicates which conditions need to be true for the alert to be triggered. If you want to rename your alert, follow these steps:
- Click the three-dot menu, and then click Edit Alert.
- Click once on the alert title.
- Enter a custom title, and then click away from the field or hit the Enter key to see your update.
- Click Save Alert to save your new title.
Your custom alert title will appear in any publicly visible alerts that are listed in the alert view window on that tile. The custom title will also appear in the alert notifications.
Hover over the custom title of any alert in the alert view window to see the conditions that trigger that alert.
Setting alert conditions
In the Condition drop-downs in the alert creation window, you can set the components that tell Looker how to check the tile data for changes and the kinds of changes that trigger an alert notification.
The alert condition is represented by these components:
- The list of fields or table calculations that appear in the dashboard tile's visualization
- The change that the selected field, fields, table calculation, or table calculations must undergo to trigger the alert notification
- The magnitude of the change that would trigger the alert notification
These conditions include the following:
- Is greater than
- Is less than
- Is equal to
- Is greater than or equal to
- Is less than or equal to
If the query contains a date or time field, these additional conditions are available:
- Increases by
- Decreases by
- Changes by (a combination of Increases by and Decreases by)
Using these comparison conditions with time series data has some additional considerations. For more information, see this Best Practices page on Setting alerts based on time series data.
You can create alerts that are based on comparisons of whole number and decimal data values only. To set alerts that are based on percentage changes of data values, see the Setting alert conditions based on percentage changes of data values best practices page.
Setting alert notifications
Under the Where to send it section of the alert creation window, you can specify the destination of the alert notification.
Sending alerts to email
To send your alert notifications to email, select Email from the Where to send it drop-down. You can designate the recipients of the alert email notification. Your email will be listed by default, and you can modify the list of recipients as necessary. Your permissions determine which email domains you're able to send alert notifications to.
Each recipient will receive an email with information about the alert and an option to unfollow the alert. If they choose to unfollow the alert, their email address will be removed from the recipient list.
Include custom link
For embedded dashboards, you can customize the URL that you provide for recipients to link back to Looker. To use this option, a Looker admin or a user with either the schedule_look_emails
or the create_alerts
permission first must specify allowed domains for the custom link and select the format of the custom link URL in the Embed page in the Admin menu.
- In the Domain field, select one of the available domains.
- In the Path field, enter a path to the dashboard, such as
/dashboards/12
or/reports/salesoverview
. The Path option is displayed only if User defined URL is selected in the Select content path field on the Embed page in the Admin menu. - In the URL label field, optionally enter new text for the link that points to the content. This field will display any text that is entered in the URL label field in the Embed page in the Admin menu by default and can be changed in this field.
Sending alerts to the Slack Attachment (API Token) integration
The Slack Attachment (API Token) action is available from the Looker Action Hub. When this action is enabled on the Actions page in the Admin panel, Slack Attachment (API Token) will show up as an option in the Where to send it drop-down of the alert creation window.
Admins of customer-hosted instances that use a self-hosted action hub server must restart their action hub server when they update their Looker instance.
Once a Looker admin has enabled the Slack Attachment (API Token) action and the Looker app bot user has been set up in Slack, you can follow these steps to send alert notifications to Slack by using the Slack Attachment (API Token) integration:
Select Slack Attachment (API Token) from the Where to send it drop-down.
The Channel Type and Share In fields will appear below the Where to send it drop-down.
Even if embed users have permissions to send alert notifications to the Slack Attachment integration, they won't see the Slack Attachment (API Token) in the Where to send it drop-down unless their Slack workspace is configured for the Looker app bot user.
Use the Channel Type field to specify the type of Slack recipient for the alert:
- Channels: Send the alert to a Slack channel
- Users: Send the alert in a direct message to a Slack user
Once you've selected the channel type, the Share In field is populated with the channel or direct message options that are applicable to the credentials of the Looker app bot user in the Slack workspace.
In the Share In field, select the direct message or channel that you want to send the alert notification to. The selected user or channel will receive a notification with information pertaining to the tile that the alert is set on:
- A PNG image of the dashboard tile visualization
- A message with the name of the dashboard or the custom alert title and the conditions that triggered the alert
- A link to navigate to the tile's dashboard
- A link to unsubscribe from the alert notification
For single value visualizations, the Slack notification will include the single value as text, rather than a PNG of the visualization.
Sending alerts to the Slack integration
The Slack action is available from the Looker Action Hub. When this action is enabled on the Actions page in the Admin panel, Slack will show up as an option in the Where to send it drop-down of the alert creation window. A Looker admin must also connect at least one Slack workspace to the Looker instance.
The Slack integration is available to Looker-hosted deployments that satisfy these conditions:
- The instance is on Looker 6.24 or later.
- The IP Allowlist feature is not enabled on the Looker instance.
This Slack integration is not supported for customer-hosted instances.
To enable installation of the Looker app, your Slack workspace owner may need to adjust the app installation settings for your Slack workspace.
Once a Looker admin has enabled the Slack action and connected the appropriate Slack workspaces, you can send alert notifications to Slack by following these steps:
Select Slack from the Where to send it drop-down.
If you have not already authenticated into Slack, a Sign in with Slack button appears under the Where to send it drop-down.
Click Sign in with Slack. Looker will request access to the Slack workspace. If your Looker admin has connected multiple Slack workspaces to your Looker instance, a drop-down menu appears in the upper right of the OAuth page. Select the appropriate Slack workspace from the drop-down. Click Allow.
You can also authenticate into Slack from your personal account page in Looker. If your Looker admin has connected multiple Slack workspace to your Looker instance, you'll see a list of workspaces with options to sign in to each one individually.
After you have logged in to at least one Slack workspace, the Channel Type and Share In fields will appear below the Workspace field.
Even if embed users have permissions to send alert notifications to the Slack integration, unless their Slack workspace is connected to the Looker instance, they won't see the Slack option in the Where to send it drop-down.
The Workspace drop-down shows a list of any workspaces that you're signed in to. Select a workspace from the list. If you don't see the workspace to which you want to send the alert notification, you can see a list of the workspaces that your Looker admin has connected to your Looker instance and sign in to each one individually from your personal account page in Looker.
The Share In field is populated with the channel and direct message options that are based on the selected Slack workspace. Select the direct message or channel that you would like to send the alert notification to. Anyone in that channel will see a notification with information pertaining to the tile that the alert is set on:
- A PNG image of the dashboard tile visualization
- A message with the name of the dashboard or the custom alert title and the conditions that triggered the alert
- A link to navigate to the tile's dashboard
- A link to unsubscribe from the alert notification
For single value visualizations, the Slack notification will include the single value as text, rather than a PNG of the visualization.
Setting alert frequency
Under the Frequency section of the alert creation window, you can set the frequency at which Looker checks your data for changes (and sends an alert notification if the alert conditions are met). The default frequency is Daily at 05:00. The available frequency options are as follows:
- Monthly on a specified Day of the month (the default is the 1st of the month) at a specified Time (the default is 05:00)
- Weekly on a specified Day of the week (the default is Sun for Sunday) at a specified Time (the default is 05:00)
- Daily at a specified Time (the default is 05:00)
- Hourly at a specified interval (the default is to check the data every hour) with specified Start and End times (the default is 05:00 and 17:00). With hourly intervals you can have Looker check the data at these intervals:
- Hour
- 2 hours
- 3 hours
- 4 hours
- 6 hours
- 8 hours
- 12 hours
- Minutes at a specified interval (the default is to check the data every 15 minutes) with specified Start and End times (the default is 05:00 and 17:00). With minute-based intervals, you can have Looker check the data at these intervals:
- 15 minutes
- 30 minutes
Start and End times are inclusive. For example, if you set Check every to 12 hours with a Start time of 05:00 and an End time of 17:00, Looker will check the data at 05:00 and 17:00.
Looker sends alerts according to the time zone that is indicated in the Application Time Zone setting on the Admin Settings page, or, if enabled, the alert creator's User Specific Time Zone.
Setting alerts permissions
For security reasons, some alerts cannot be viewed or followed by other users, and you cannot view or set their permissions.
You can set your alert's permissions by selecting the Public or Private options from the Permissions drop-down in the alert creation window. If an alert can be followed, it is marked Public by default, which means that any Looker user with follow permissions on the dashboard tile's underlying content can see your alert and its settings on the alert view window. They can also follow your alert so that they can receive email notifications when your alert's conditions are triggered.
You can set your alert to Private so that its settings are viewable only to you (and admins) by choosing the Private option from the Permissions drop-down in the alert creation window.
Alerts to the Slack and Slack Attachment (API Token) integrations cannot be followed; however, if you are creating an alert to one of these destinations and mark it Public, other users will be able to see and duplicate your alert settings.