1 - Alert emails

Overview of the various kinds of alert emails Butler can send when app reloads fail in Qlik Sense Cloud.

Scheduled vs manual app reloads

Qlik Sense Cloud has a few different ways to reload apps:

  1. Scheduled reloads: Apps can be set to reload at specific times, for example every night at 3am.
  2. Manually started reload: Right clicking an app in the Qlik Cloud web UI, then select “Reload now”. This is a manual reload and is not managed by the Sense scheduling service.
  3. Manual reloads started from the script editor: When developing apps in the Sense client/script editor you usually reload the apps from there. This triggers an app reload too, but in a slightly different way than previous example. Instead the reload is done directly in the engine service. Butler is not notified in this case, so no alert emails are sent for these reloads.

Note

The reload failure notifications described here work in all cases except the “manual reloads started from the script editor”.
There is currently no way around that, it’s just how Qlik Cloud works.

Alert emails

Butler can send the following alert emails:

  • When an app reload fails.

Alert emails can be formatted using HTML, use CSS styling, emojis etc.
There’s no reason an alert email can’t look good!

Here is an example of how a failed reload alert email could look like:

Reload failed alert email

Alert emails to app owners

All apps in Qlik Sense Cloud has an app owner, typically the user who created the app.

If there is an email address associated with the app owner, Butler can send an alert email to the app owner when a reload task fails or is aborted.
This feature can be turned on/off in the Butler config file.
It is also possible to only send alert emails to some app owners but not others, this page describes how to configure that.

Alert emails only for some apps

Sometimes there is a desire to only have email alerts for some aps.
Maybe some apps are critical and should always trigger an alert email when they fail, while other apps are less critical and should not trigger any alert emails.

This is possible using a tag set on apps in Qlik Sense Cloud:

Tagging apps for reload failed alerts in Qlik Sense Cloud

More info in the setup section.

How it works

Butler uses a templating engine called Handlebars. It is used when sending all kinds of alert emails supported by Butler.

For an overview of how Butler deals with alert messages for Qlik Sense Cloud, please see the setup section.

Template fields

The Handlebars templating engine looks for template fields in the template files you create.

A complete list of template fields - including descriptions - is available in the Reference section.

2 - Alerts via Slack and Microsoft Teams

Sending alerts to IM services like Slack and Microsoft Teams can be a great way to quickly notify people about urgent issues.

Teams, Slack and email notifications

Microsoft Teams, Slack and email are all notification destinations.

Alert messages/notifications come in two variants: “basic” and “formatted”.

Formatted messages

These messages take full advantage of the formatting available in each notification destination.

Slack has its own way for creating messages with rich layout and formatting - as does Teams and email.

Formatted messages are created using template files.
Each notification destination has its own set of template files. It’s therefore possible to take advantage of each destination’s specific features when it comes to formatting the messages sent by Butler.

Message templates can include “template fields”. These are placeholders that are replaced with actual event values before the message is sent.

The GitHub repository includes fully functional template files for all destinations.

Basic messages

Basic message formats are available for all notification destinations.

This message type is useful if you only want a short, basic notification that a task failed or was aborted. The basic formats are pre-defined and are thus easy to set up.

Microsoft Teams notifications

Basic and formatted reload task failure notifications can look like this in Teams:

Basic failed reload notification in Microsoft Teams

Formatted failed reload notification in Microsoft Teams

The configuration needed for setting this up is described here.

Slack notifications

Basic and formatted reload task failure notifications can look like this in Teams:

Basic failed reload notification in Microsoft Teams

Formatted failed reload notification in Microsoft Teams

The configuration needed for setting this up is described here.

3 - Storing script logs of failed reloads to disk

When investigating reload failures it can often be useful to have access to the entire reload log.

Butler can store complete script logs for failed app reloads on local disk, making it easy to figure out what happened without having to log into Qlik Cloud.

Reload script logs

Butler can be configured to retrieve and store the reload logs of all failed app reloads to disk.

The feature is identical to that of client-managed Qlik Sense, but those features can be individually enabled/disabled and configured.

The reload logs are stored in the directory configured in the Butler config file, with separate directories for each date:

.
└── scriptlog
    ├── qscloud
    │   └── 2024-10-14
    │       └── 2024-10-14T11-41-31_appId=86ee4ae7-7ae7-4dd4-98a1-ebea989f78fb_reloadId=670d0369dededd0781e18ade.log
    └── qseow
        └── 2024-10-10
            └── 2024-10-10_15-35-25_appId=8f1d1ecf-97a6-4eb5-8f47-f9156300b854_taskId=22b106a8-e7ed-4466-b700-014f060bef16.log

5 directories, 2 files

All in all this makes it a lot easier to find log files for failed reloads.

Configuration of this feature is described here.