Notifications
SquaredUp can alert you when the state of any monitor changes by sending notifications.
Simply add a new notification rule in the Monitors section inside a workspace and configure the trigger and destination. See Setting notification rules for more information. You cannot Edit, Pause and Delete destinations from the Monitors page.
The supported integrations are:
This short video (2 mins 40) shows how to enable monitoring for a tile and add a new notification rule:
The Settings > Notifications page allows you to manage your notification destinations. You are able to Add, Edit, Pause and Delete destinations.
Once you have added destinations, they will be shown in a table on the Settings > Notifications page. The table shows the number of workspaces and rules using the destination. Clicking on the Workspace number displays which workspaces are using the destination, and how many rules in the workspace are using the destination.
Setting notification rules
You can create notification rules that specify which state changes should trigger a notification to a destination. Notification rules are created on the Monitors page.
Rules are made up of three parts:
Trigger – the list of entities (e.g. tile monitors) whose state change can trigger a notification to a selected destination.
Integration – the supported list of endpoints upon which a destination is configured.
Options - include a tile preview in the notification message (on by default). Note: ServiceNow does not support a tile preview.
To configure the notification rule in SquaredUp:
Browse to Monitors, and then select Add notification rule.
Select the Trigger for your notification. By default, this is set to All monitors in this workspace. Click on the Trigger to change it, available options are:
This workspace state only – notify when the workspace changes state.
All monitors in this workspace – notify when any monitor within the workspace changes state. The notification message will include details of the monitor that has changed state, as well as details of the state change.
Selected monitors in this workspace – notify when specific monitors within the workspace change state. Functions the same as All monitors in this workspace, but allows you to only trigger on a subset. For example, only on database monitors.
Click Save.
Select the integration that you want to use from the list.
You will see a list of all destinations that have been added for the selected integration. If your desired destination is not listed, select + Add destination. See Adding a destination.
A preview of the tile is included in the notification, you can switch this off with the toggle.
Once you have added the destination, click Save.
Saved notification rules are displayed in a table on the Monitors page. The table shows the Status, Trigger and Destination for each notification rule in the selected workspace.
You can create as many notification rules for each workspace as you like.
A notification rule is listed as either Active or Disabled. A notification rule is Disabled if the destination is paused or deleted via the Settings > Notification page.
While it won’t be listed as disabled, a notification rule will also cease to function if it has been set to trigger when monitors change state but the workspace no longer contains any monitors (or the specific monitors the rule was monitoring are deleted).
Adding a destination
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.
Email addresses:
Enter one or more email addresses. Multiple email addresses are supported, but we recommend the use of distribution/mailing lists instead of trying to add many addresses and keep them up to date with organization changes.
ServiceNow
No configuration is required within ServiceNow. However, you may want to create a specific user within ServiceNow to use with the SquaredUp destination. The user will appear as the caller on ServiceNow incidents that are created by SquaredUp. The user will need permission to create and add comments to incidents. Permission to change the state of incidents (e.g. mark as resolved) is not required.
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.
Username:
Enter your ServiceNow username.
Password:
Enter your ServiceNow password.
URL:
Enter the URL of your ServiceNow instance.
Test:
Use the Test button to send a test notification and check that it is working as expected.
Slack
There are two ways to configure Slack notifications:
Slack API
Slack Webhook
The API approach is more complex to configure, but more flexible. In particular, it allows notifications to be sent to multiple Slack channels, whereas a Slack webhook is tied to a specific Slack channel.
If you are likely to configure multiple SquaredUp notification destinations to target different Slack channels, the API approach may be preferable. If you are only targeting a single Slack channel, the webhook approach should suffice.
You will need to create a Slack app. Go to https://api.slack.com/apps and click on Create New App.
Choose From scratch, specify a name for the app and the Slack workspace that hosts the Slack channels you want to send notifications to.
Configure the app icon and description. You can use whatever name, description and icon you would like, but it makes sense for them to refer to SquaredUp so that users can clearly see where the notifications are originating from.
Select Add features and functionality and then choose the Permissions option.
Configure the chat:write permission to Send messages as @squaredup_alerts.
Configure the chat:write.public permission to Send messages to channels.
Click Install to Workspace.
You should now be given a token.
Now use the token to configure the destination in SquaredUp:
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.
Token:
Paste the API token in here.
You can use the same token to configure multiple SquaredUp destinations, each targeting a different Slack channel.
Slack channel:
Enter the destination Slack channel for messages to be delivered to.
You can specify public or private Slack channels, but for private channels the Slack app you created must be added to the Slack channel (type
/invite
in the Slack channel).Test:
Use the Test button to send a test notification and check that it is working as expected.
In Slack, when you click the View button in the notification you may get a warning triangle beside it. To fix this, add
https://api.squaredup.com/api/slack_interaction
as the Interaction URL.
You will need to create a Slack app. Go to https://api.slack.com/apps and click on Create New App.
Choose From scratch, specify a name for the app and the Slack workspace that hosts the Slack channels you want to send notifications to.
Configure the app icon and description. You can use whatever name, description and icon you would like, but it makes sense for them to refer to SquaredUp so that users can clearly see where the notifications are originating from.
Go to Incoming Webhooks and enable the Activate Incoming Webhooks option.
Click Add new Webhook to Workspace and choose the Slack channel you want to target.
Copy the URL.
Now use the webhook URL to configure the destination in SquaredUp:
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.
URL:
Paste the webhook URL to configure the destination in SquaredUp.
Test:
Use the Test button to send a test notification and check that it is working as expected.
In Slack, when you click the View button in the notification you may get a warning triangle beside it. To fix this, add
https://api.squaredup.com/api/slack_interaction
as the Interaction URL.
MS Teams (webhook)
Sending alerts to a Microsoft Teams channel is simple to configure:
Go to the Teams channel and select the Connectors option.
From the list of connectors, choose the Incoming Webhook connector and add it to the channel.
Give the webhook connector a name and icon. It makes sense to use a SquaredUp name and icon to make it clear that the alerts are coming from SquaredUp.
Click Create and you should be given a webhook URL.
Copy the webhook URL and then click Done.
Now use the webhook URL to configure the destination in SquaredUp:
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.
URL:
Paste the webhook URL to configure the destination in SquaredUp.
Test:
Use the Test button to send a test notification and check that it is working as expected.
Zapier
For when you need more complex actions to occur as a result of a monitoring notification, you can use our Zapier integration to trigger any number of external integrations. Configuration of a new Zapier Zap is performed outside of the SquaredUp application, directly in your Zapier web portal.
Prerequisites:
A SquaredUp API Key: In SquaredUp browse to Settings > API Keys > Create new API Key. Copy the API key to your clipboard.
Configure a new Zap in your Zapier web portal
In your Zapier portal, create a new Zap, selecting the SquaredUp integration for your Zap trigger.
When configuring the SquaredUp trigger, select the one available event, New Notification. This trigger is invoked when a new monitoring notification is raised by the SquaredUp platform.
Next, configure your secure connection with your SquaredUp account by connecting with the API Key you obtained earlier. You will also need to know if you are accessing our SquaredUp US or EU application region.
If you access your SquaredUp application via the https://app.squaredup.com URL, this is the US region. https://eu.app.squaredup.com is our EU region.
After connecting successfully to your SquaredUp account with your API Key, you need to configure the trigger with a name for the Notification Destination that will be created. This is the name that will appear in your list of notification destinations in the SquaredUp application. Choose something meaningful like ‘My SquaredUp Zapier Integration’. This name needs to be unique and not clash with any existing notification destination names.
On the next step, click Test Trigger to see an example notification message that will be sent to Zapier when this trigger fires.
This is sample data, not an actual notification alert.
At this stage, you can continue to set up the rest of your Zap, and select one or more actions to invoke as a result of any notifications.
Once your Zap is complete, save/publish your Zap. At this point, Zapier will create the Notification Destination in your SquaredUp application. You may need to refresh the list of Notification Destinations to see the newly created Zapier destination.
The last step is to utilize this new notification destination in the workspaces you wish to monitor. From any workspace, select Monitors on the left-hand nav bar, and add a new monitoring rule to use your newly created Zapier destination.
Custom webhook
This option allows any webhook (HTTP POST endpoint) to be used to send notifications.
An example would be to use a third-party service like https://apify.com/ to send a customized email.
The JSON body of the webhook request is totally customizable, using inserts to specify elements of the notification – including the name of the monitored entity (e.g. SquaredUp Workspace name), the previous and new states, and a link back to the SquaredUp app. See ... for more details.
This is an example of the JSON body:
{
"text": "{{stateSymbol}} {{name}} changed from {{oldState}} to {{newState}}.",
"link": "{{link}}"
}
This is just an example, and will need to be edited to match the requirements of the particular webhook being used. For example, this JSON is in the structure required for sending emails through apify.com:
{
"subject": "{{stateSymbol}} {{name}} has changed from {{oldState}} to {{newState}}.",
"html": "Hi there t<p>{{stateSymbol}} The health of <b><a href='{{link}}'>{{name}}</a></b> has changed from <b>{{oldState}}</b> to <b>{{newState}}</b>.<p style='color:blue;font-size:0.9em''><em>Brought to you by SquaredUp Alerts™</em>",
"to": "sue.bloggs@squaredup.com"
}
The SquaredUp destination configuration requires the webhook URL and JSON:
A new destination can be configured when adding a notification rule in the Monitors section inside a workspace, or under Settings > Notifications
Destination Name:
Enter a name for your destination. This helps you to identify this destination in the list of your destinations.
URL:
Paste the webhook URL to configure the destination in SquaredUp.
Body:
Enter the JSON body for the channel.
Test:
Use the Test button to send a test notification and check that it is working as expected.
A custom notification destination consists of a URL and a template for the message body that is POST-ed to the URL.
A web site like https://webhook.site can be used to experiment with custom notifications before integrating with your destination.
Supported webhooks
The webhook must take a JSON body passed via POST. It is not possible to pass headers. Authentication is not supported. The URL can include query parameters but they must be fixed - the URL cannot contain variables like the body.
Template structure
The body of the notification must be specified as a template. The template specifies the structure of the JSON passed to the webhook, along with variables that are replaced with details of the notification when each notification is sent.
A simple webhook body structure is
{
"text": "{{stateSymbol}} {{name}} changed from {{oldState}} to {{newState}}."
}
The JSON is an object with a single text property. This structure works for many destinations - Slack, Teams, Google Chat etc. However often more advanced structures can be used to give more options and more sophisticated formatting. Consult the documentation for the destination system to discover all of the options. A web search for incoming webhook and your destination type may prove useful.
Template variables
Template variables use the Mustache syntax. See mustache(5) - Logic-less templates. for details.
The following parameters are available.
Variable | Notification Types | Example | Notes |
{{stateSymbol}} | All | Visual indicator for the state of the workspace or tile. Red for error, orange for warning, green for success and grey for unknown. Note that this is a Unicode character rather than an image. It may not render correctly on all environments. | |
{{name}} | All | App ABC Response Tim | Name of the monitored object. Typically a workspace name or a tile name. |
{{oldState}} | All | Warning | The state of the monitored object before the latest state change. |
{{newState}} | All | Error | The state that the monitored object has just transitioned to. |
{{link}} | All | http://app.squaredup.com/dashboard/dash-snzu2jsbnVwNA00zdWt3 | Link to the monitored object in SquaredUp. Typically a link to a workspace or dashboard. |
{{{notificationsConfigLink}}} | All | http://app.squaredup.com/monitoring/space-eje3K958peQJJTiziriF | Link to the relevant monitoring configuration in SquaredUp. |
{{stateReason}} | Tile monitors | Duration mean for the last 24 hours is 557, which is greater than the error threshold 500 | An English description of the reason the monitored object changed state. Use a conditional block to only render when the reason is available, e.g. {{#stateReason}}State reason is: {{stateReason}}.{{/stateReason}} |
{{{imagePreviewUrl}}} | Tile monitors | https://s3.amazonaws.com/squaredup-account-common-notify-images-dev/transient/f976ed8e-ace7-4ad1-887e-41d28e394039.png | A link to an image that shows the tile shortly after the state change. Use a conditional block to only render when the image is available, e.g. {{#imagePreviewUrl}}Tile preview: {{{imagePreviewUrl}}}{{/imagePreviewUrl}} |
{{workspaceName}} | All | Application ABC | Name of the workspace that contains the monitored object. |
{{{workspaceLink}}} | All | http://app.squaredup.com/workspace/space-eje3K958peQJJTiziriJ | Link to the workspace that contains the monitored object. |
{{dashboardName}} | Tile monitors | Application ABC Performance | Name of the dashboard containing the tile monitor. |
{{{dashboardLink}}} | Tile monitors | http://app.squaredup.com/dashboard/dash-snzu2jsbnVwNA00zdWt3 | Link to the dashboard that contains the monitored object. |
{{tileName}} | Tile monitors | EC2 Server Response Time | Name of the tile whose monitor has changed state. As this is only populated for tile monitors, it can be useful for conditional blocks based on whether the notification is for a tile monitor or a workspace, e.g. {{#tileName}}This is tile monitor notification!{{/tileName}} |
Template variable tips
Normal text variables should use double-curly-brackets, e.g. {{name}}
URLs should use triple-curly-brackets to avoid being broken by escaping, e.g. {{{link}}}
Some variables are not populated for all notification types. To make a section of the template conditional on a variable having a value, use a conditional block, e.g. {{#var1}}This is only included if var1 has a value{{/var1}}.
Examples
Plain text
A simple notification that supports all notification types but does not include any details for tile monitor notifications. This will work with many destination types including Slack, Teams and Google Chat.
{
"text": "{{stateSymbol}} {{name}} changed from {{oldState}} to {{newState}}. View in SquaredUp: {{{link}}}"
}
Plain text with tile monitor details (state reason, tile preview link)
This will work with many destination types including Slack, Teams and Google Chat.
{
"text": "{{stateSymbol}} {{name}} changed from {{oldState}} to {{newState}}. {{#stateReason}}{{stateReason}}. {{/stateReason}}{{#imagePreviewUrl}}Tile preview: {{imagePreviewUrl}}. {{/imagePreviewUrl}}View in SquaredUp: {{{link}}}. Change your notification preferences: {{{notificationsConfigLink}}}"
}
Rich formatting using Slack ‘blocks’
This will only work with Slack.
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "{{stateSymbol}} *<{{{link}}}|{{name}}>* changed from {{oldState}} to *{{newState}}*.{{#stateReason}}\n {{stateReason}}.{{/stateReason}}{{#tileName}}\nThis monitor is part of the <{{{dashboardLink}}}|*{{dashboardName}}*> dashboard in the <{{{workspaceLink}}}|*{{workspaceName}}*> workspace.{{/tileName}}{{#imagePreviewUrl}}\nTile preview <{{imagePreviewUrl}}|here>.{{/imagePreviewUrl}}\nChange your notification preferences <{{{notificationsConfigLink}}}|here>."
}
}
]
}
Rich formatting using Teams ‘MessageCard’
This will only work with MS Teams.
{
"@context": "https://schema.org/extensions",
"@type": "MessageCard",
"themeColor": "5D3FD3",
"text": "{{stateSymbol}} [**{{name}}**]({{&link}}) changed from {{oldState}} to **{{newState}}**.",
"sections": [
{
"text": "{{#stateReason}}{{stateReason}}. {{/stateReason}}{{#tileName}}This monitor is configured on the [**{{dashboardName}}**]({{&dashboardLink}}) dashboard in the [**{{workspaceName}}**]({{&workspaceLink}}) workspace.{{#imagePreviewUrl}}![Tile preview]({{&imagePreviewUrl}}){{/imagePreviewUrl}}{{/tileName}}",
"potentialAction": [
{
"@type": "OpenUri",
"name": "View",
"targets": [
{ "os": "default", "uri": "{{{link}}}" }
]
}
]
},
{
"text": "Change your notification preferences [**here**]({{{notificationsConfigLink}}})."
}
]
}