Skip to content

Commit

Permalink
Add concept page for successful reloads
Browse files Browse the repository at this point in the history
  • Loading branch information
mountaindude committed Dec 15, 2023
1 parent 0cf9e43 commit 9e24579
Show file tree
Hide file tree
Showing 148 changed files with 6,895 additions and 862 deletions.
7 changes: 7 additions & 0 deletions content/en/docs/concepts/failed reloads/_index.md
@@ -0,0 +1,7 @@
---
title: "Failed/aborted reloads"
linkTitle: "Failed/aborted reloads"
weight: 30
description: >
Overview of the actions Butler can take when a reload task fails or is aborted.
---
@@ -1,6 +1,6 @@
---
title: "Storing script logs of failed reloads to disk"
linkTitle: "Failed reload logs"
linkTitle: "Store failed reload logs"
weight: 42
description: >
When investigating reload failures it can often be useful to have access to the entire reload log.<br>
Expand Down
97 changes: 97 additions & 0 deletions content/en/docs/concepts/successful reloads/_index.md
@@ -0,0 +1,97 @@
---
title: "Successful reloads"
linkTitle: "Successful reloads"
weight: 40
description: >
Tracking successful reloads can be useful for various reasons, for example knowing how long different app reloads takes on average.
---

## What's this?

Butler can optionally track successfully completed reload tasks.

Historically few Sense admins have probably paid much attention to successful reloads (but rather looked at failed ditto), but from a performance planning perspective it's relevant to also monitor successful reloads.

## Monitoring some successful reloads or all

Butler can be configured to track all successful reloads, or only those that have a specific custom property set.
This can be useful if you want to track successful reloads for some apps but not others.

- To enable this feature for all reload tasks, set `Butler.influxDb.reloadTaskSuccess.allReloadTasks.enable` to `true`.
- To enable this feature for only some reload tasks, set `Butler.influxDb.reloadTaskSuccess.byCustomProperty.enable` to `true`.
This setting will have no effect if `Butler.influxDb.reloadTaskSuccess.allReloadTasks.enable` is set to `true`.
- The name of the custom property is configured in the Butler config file, `Butler.influxDb.reloadTaskSuccess.byCustomProperty.customPropertyName`.
- The value of the custom property that will enable per-task-tracking is found in `Butler.influxDb.reloadTaskSuccess.byCustomProperty.enabledValue`.

## Using tags

Both Sense apps and reload tasks can have tags attached to them (set in the QMC).
Butler can be configured to get these tags and include them in the data sent to the enabled destinations.

In the case of InfluxDB the Sense tags will be sent as InfluxDB tags, which means they can be used to filter data in InfluxDB queries and Grafana dashboards.

The config file also allows for adding static tags to the data sent to InfluxDB, this is set in `Butler.influxDb.reloadTaskSuccess.tag.static`.

## Grafana dashboards

Given the information stored in InfluxDB, several interesting Grafana dashboards can be created:

- Distribution of reload durations. If filtering on a specific reload task this will show how much the task duration vary. Can be very useful when investigating server performance problems.
- Number of successful reloads per (for example) 15-minute blocks. This shows how reloads are distributed over the course of a day, and can be useful when deciding when to schedule reloads.

Sample dashboard showing the above charts:

![alt text](./butler-grafana-successful-reloads-1.png "Grafana reload success")

## How it works

### Reload success UDP server

Butler includes a UDP server to which Sense's logging framework Log4Net can send reload success messages.

The UDP server is configured in the Butler config file, and is disabled by default.
When enabled, the UDP server listens for UDP messages on the configured port.

When a UDP message is received, the UDP server will parse the message to determine what it is about and to extract relevant data, then dispatch the message to the enabled destinations.

In the case of successful reload tasks, the UDP server will determine which app was reloaded, the duration of the reload task, who started the task etc.
Butler will then send this information to the enabled destinations.

## Supported destinations

The following destinations are supported:

- InfluxDB

### Config file settings

```yaml
Butler:
...
...
# InfluxDB settings
influxDb:
enable: false # Master switch for InfluxDB integration. If false, no data will be sent to InfluxDB.
...
...
reloadTaskSuccess:
enable: true
allReloadTasks:
enable: false
byCustomProperty:
enable: true
customPropertyName: 'Butler_SuccessReloadTask_InfluxDB'
enabledValue: 'Yes'
tag:
static: # Static attributes/dimensions to attach to events sent to InfluxDb
# - name: event-specific-tag 1
# value: abc 123
dynamic:
useAppTags: true # Should app tags be sent to InfluxDb as tags?
useTaskTags: true # Should task tags be sent to InfluxDb as tags?
...
...
```



Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9e24579

Please sign in to comment.