Skip to content

Commit

Permalink
Updates wrt 13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mountaindude committed Oct 18, 2024
1 parent 335925b commit 89a1ba2
Show file tree
Hide file tree
Showing 262 changed files with 17,318 additions and 2,479 deletions.
15 changes: 10 additions & 5 deletions content/en/docs/concepts/failed reloads/_index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: "Failed/aborted reloads"
linkTitle: "Failed/aborted reloads"
title: "Reload alerts"
linkTitle: "Reloads alerts"
weight: 30
description: >
Overview of the actions Butler can take when a reload task fails or is aborted.
Overview of the actions Butler can take when a reload task fails, is aborted or succeeds.
Note that client-managed and cloud versions of Qlik Sense
---

Below follows a list of destinations to which Butler can send notifications when a reload task fails or is aborted.
{{< notice info >}}
Client-managed and cloud versions of Qlik Sense support different source triggers (reload failed/stopped/succeeded) and alert destinations (email, Teams, Slack, etc).

A comparison of the different alert destinations can be found [here](/docs/getting-started/setup/reload-alerts/#alert-destinations-and-options).
Check each section below for information about which triggers and destinations are supported for each version.
{{< /notice >}}
12 changes: 12 additions & 0 deletions content/en/docs/concepts/failed reloads/client-managed/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Client-managed Qlik Sense"
linkTitle: "Client-managed"
weight: 100
description: >
---


Below follows a list of destinations to which Butler can send notifications when a reload task fails or is aborted.

A comparison of the different alert destinations can be found [here](/docs/getting-started/setup/reload-alerts/#alert-destinations-and-options).
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In a regular email client a reload failed email could look like below.

***Note the end of the script*** - the last few lines of the reload log are often very useful when it comes to understanding what caused the reload failure.

![Reload failed alert email](failed_reload_email_1.png "Reload failed alert email")
![Reload failed alert email](failed_reload_email_2.png "Reload failed alert email")

### Basic alert emails also possible

Expand Down Expand Up @@ -88,16 +88,15 @@ Conceptually it works like this:

![Task specific alert email recipients](/img/butler-different-recipients-alert-emails-1.png "Task specific alert email recipients")


Instructions for how to configure this feature is available [here](/docs/getting-started/setup/reload-alerts/alert-emails/#send-alerts-to-specific-people-for-some-tasks).

Note: This feature is similar to - but independent from - the "alert emails only for some tasks" feature below. Either feature can be enabled or disabled independently of the other in Butler's config file.

## How it works

Butler uses a templating engine called [Handlebars](https://handlebarsjs.com/guide/). It is used when sending all kinds of alert emails supported by Butler.
Butler uses a templating engine called [Handlebars](https://handlebarsjs.com/guide/). It is used when Butler sense alert emails.

Slack, MS Teams and MQTT messages are currently not using the templating engine - this is however likely to change in coming Butler versions. Feel free to [add (or +1) a request on GitHub](https://github.com/ptarmiganlabs/butler/issues) if this is of interest to you!
The high-level system overview below shows how email (and other alert types) are sent by Butler:

![Butler high level system overview](/img/butler-log4net-appenders-1.png "Butler high level system overview")

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ The reload logs are stored in the directory configured in the Butler config file

```bash
.
├── butler.exe
├── log
│   └── butler.2022-04-07.log
├── production.yaml
└── scriptlog
├── 2022-04-06
│   ├── 2022-04-06_15-36-12_appId=deba4bcf-47e4-472e-97b2-4fe8d6498e11_taskId=0d815a99-1ca3-4131-a398-6878bd735fd8.log
│   └── 2022-04-06_22-42-35_appId=66bc109d-286a-415b-8355-1422abb22133_taskId=e959f40a-67be-4a5b-ae83-a292f96ba078.log
└── 2022-04-07
└── 2022-04-07_05-49-16_appId=deba4bcf-47e4-472e-97b2-4fe8d6498e11_taskId=0d815a99-1ca3-4131-a398-6878bd735fd8.log
├── 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.
Expand Down
8 changes: 8 additions & 0 deletions content/en/docs/concepts/failed reloads/cloud/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Qlik Sense Cloud"
linkTitle: "Cloud"
weight: 200
description: >
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "Alert emails"
linkTitle: "Alert emails"
weight: 30
description: >
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.

{{< notice 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.
{{< /notice >}}

## 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](/img/butler-qscloud-app-reload-failed-email-2.png "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](/docs/getting-started/setup/reload-alerts/cloud/alert-emails/#sending-alert-emails-to-app-owners) 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](/img/butler-qscloud-app-reload-failed-app-tag-1.png "Tagging apps for reload failed alerts in Qlik Sense Cloud")

More info in the [setup section](/docs/getting-started/setup/reload-alerts/cloud/alert-emails/#send-alerts-only-for-some-apps).

## How it works

Butler uses a templating engine called [Handlebars](https://handlebarsjs.com/guide/). 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](/docs/getting-started/setup/reload-alerts/cloud/#how-it-works).

### 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](/docs/reference/alert-template-fields) section.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: "Alerts via Slack and Microsoft Teams"
linkTitle: "Alerts via Slack/Teams"
weight: 40
description: >
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](/img/failed-reload-teams-basic_1.png "Basic failed reload notification in Microsoft Teams")

![Formatted failed reload notification in Microsoft Teams](/img/failed-reload-teams-formatted_1.png "Formatted failed reload notification in Microsoft Teams")

The configuration needed for setting this up is described [here](/docs/getting-started/setup/reload-alerts/alert-teams/).

## Slack notifications

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

![Basic failed reload notification in Microsoft Teams](/img/failed-reload-slack-basic_1.png "Basic failed reload notification in Microsoft Teams")

![Formatted failed reload notification in Microsoft Teams](/img/failed-reload-slack-formatted_1.png "Formatted failed reload notification in Microsoft Teams")

The configuration needed for setting this up is described [here](/docs/getting-started/setup/reload-alerts/alert-slack/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Storing script logs of failed reloads to disk"
linkTitle: "Store failed reload logs"
weight: 50
description: >
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:

```bash
.
└── 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](/docs/getting-started/setup/reload-script-logs/).
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ Some configuration in Sense is needed to make this work:
2. In Qlik Cloud, tag the apps that should cause alert emails when they fail reloading.
1. Use the same tag as specified in the config file.

Looks like this in Qlik Sense Cloud:

![Tagging apps for reload failed alerts in Qlik Sense Cloud](/img/butler-qscloud-app-reload-failed-app-tag-1.png "Tagging apps for reload failed alerts in Qlik Sense Cloud")

## How it works

The concept is the same for all alert types, see the [this page](/docs/getting-started/setup/reload-alerts/cloud/#how-it-works) for details.
Expand Down
Loading

0 comments on commit 89a1ba2

Please sign in to comment.