Merge pull request #441 from influxdata/monitor/checks

Check management docs
pull/446/head
Scott Anderson 2019-09-09 13:18:04 -06:00 committed by GitHub
commit 9a6af5151e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 320 additions and 12 deletions

View File

@ -18,7 +18,8 @@
}
}
h2,h3,h4,h5,h6 {
& + .highlight pre { margin-top: .5rem; }
& + .highlight pre { margin-top: .5rem }
& + pre { margin-top: .5rem }
& + .code-tabs-wrapper { margin-top: 0; }
}
h1 {

View File

@ -26,22 +26,22 @@
&.ui-toggle {
display: inline-block;
position: relative;
width: 34px;
height: 22px;
background: #1C1C21;
border: 2px solid #383846;
width: 28px;
height: 16px;
background: $b-pool;
border-radius: .7rem;
vertical-align: text-bottom;
vertical-align: text-top;
margin-top: 2px;
.circle {
display: inline-block;
position: absolute;
border-radius: 50%;
height: 12px;
width: 12px;
background: #22ADF6;
top: 3px;
right: 3px;
height: 8px;
width: 8px;
background: $g20-white;
top: 4px;
right: 4px;
}
}
}

View File

@ -24,6 +24,12 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-ui-eye-closed:before {
content: "\e956";
}
.icon-ui-eye-open:before {
content: "\e957";
}
.icon-ui-chat:before {
content: "\e93a";
}

View File

@ -0,0 +1,16 @@
---
title: Manage checks
seotitle: Manage monitoring checks in InfluxDB
description: >
Checks in InfluxDB query data and apply a status or level to each data point based on specified conditions.
menu:
v2_0:
parent: Monitor and alert
weight: 101
v2.0/tags: [monitor, checks, notifications]
---
InfluxDB checks query data and apply a status or level to each data point based on specified conditions.
Learn how to create and manage checks:
{{< children >}}

View File

@ -0,0 +1,146 @@
---
title: Create checks
seotitle: Create monitoring checks in InfluxDB
description: >
Create a check in the InfluxDB UI.
menu:
v2_0:
parent: Manage checks
weight: 201
v2.0/tags: [monitor, checks, notifications]
---
Create a check in the InfluxDB user interface (UI).
A check consists of two parts a query and check confiuration.
##### Check query
- Specifies the dataset to monitor.
- Requires a bucket, measurement, field, and an aggregate function.
{{% note %}}The aggregate function aggregates data points between the specified check intervals
and returns a single value for the check to process.
{{% /note %}}
- May include tags to narrow results.
##### Check configuration
- Defines check properties, including the check interval and status message.
- Evaluates specified conditions and applies a status (if applicable) to each data point:
- `crit`
- `warn`
- `info`
- `note`
- Stores status in the `_level` column.
## Create a check in the InfluxDB UI
1. Click **Monitoring & Alerting** in the sidebar.
{{< nav-icon "alerts" >}}
2. In the top right corner of the **Checks** column, click **{{< icon "plus" >}} Create**.
3. Click **Name this check** in the top left corner and provide a unique name for the check.
### Configure the query
1. In the **Query view**, select the bucket, measurement, field and tag sets to query.
2. In the **Aggregate functions** column, select an interval from the interval drop-down list
(for example, "Every 5 minutes") and an aggregate function from the list of functions.
3. Click **Submit** to run the query and preview the results.
To see the raw query results, click the the **{{< icon "toggle" >}} View Raw Data** toggle.
### Configure the check
1. Click **2. Check** near the top of the window to display the **Check view**.
2. In the **Properties** column, configure the following:
##### Schedule Every
Select the interval to run the check (for example, "Every 5 minutes").
This interval matches the aggregate function interval for the check query.
_Changing the interval here will update the aggregate function interval._
##### Offset
Delay the execution of a task to account for any late data.
Offset queries do not change the queried time range.
{{% note %}}Your offset must be shorter than your [check interval](#schedule-every).
{{% /note %}}
##### Tags
Add custom tags to the query output.
Each custom tag appends a new column to each row in the query output.
The column label is the tag key and the column value is the tag value.
Use custom tags to associate additional metadata with the check.
Common metadata tags across different checks lets you easily group and organize checks.
You can also use custom tags in [notification rules](/v2.0/cloud/monitor-alert/notification-rules/create-notification-rules/).
3. In the **Status Message Template** column, enter the status message template for the check.
Use [Flux string interpolation](/v2.0/reference/flux/language/string-interpolation/)
to populate the message with data from the query.
{{% note %}}
#### Flux only interpolates string values
Flux currently interpolates only string values.
Use the [string() function](/v2.0/reference/flux/functions/built-in/transformations/type-conversions/string/)
to convert non-string values to strings.
```js
count = 12
"I currently have ${string(v: count)} cats."
```
{{% /note %}}
Check data is represented as an object, `r`.
Access specific column values using dot notation: `r.columnName`.
Use data from the following columns:
- columns included in the query output
- [custom tags](#tags) added to the query output
- `_check_id`
- `_check_name`
- `_level`
- `_source_measurement`
- `_type`
###### Example status message template
```
From ${r._check_name}:
${r._field} is ${r._level}.
Its value is ${string(v: r._value)}.
```
When a check generates a status, it stores the message in the `_message` column.
4. In the **Conditions** column, define the logic that assigns a status or level to data.
Select the type of check to configure:
##### Threshold
A threshold check assigns a status based on a value being above, below,
inside, or outside of defined thresholds.
[Configure a threshold check](#configure-a-threshold-check).
##### Deadman
A deadman check assigns a status to data when a series or group has not
reported in a specified amount of time.
[Configure a deadman check](#configure-a-deadman-check).
##### Configure a threshold check
1. For each status you want to configure, click the status name (CRIT, WARN, INFO, or OK).
2. From the **When value** drop-down list, select a threshold: is above, is below,
is inside of, is outside of.
3. Enter a value or values for the threshold.
You can also use the threshold sliders in the data visualization to define threshold values.
##### Configure a deadman check
1. In the **for** field, enter a duration for the deadman check.
For example, `5m`, `1h`, or `2h30m`.
2. Use the **set status to** drop-down list to select a status to set on a dead series.
3. In the **And stop checking after** field, enter the time to stop monitoring the series.
For example, `30m`, `2h`, `3h15m`.
5. Click the green **{{< icon "check" >}}** in the top right corner to save the check.
## Clone a check
Create a new check by cloning an existing check.
1. In the **Checks** column, hover over the check you want to clone.
2. Click the **{{< icon "clone" >}}** icon, then **Clone**.

View File

@ -0,0 +1,32 @@
---
title: Delete checks
seotitle: Delete monitoring checks in InfluxDB
description: >
Delete checks in the InfluxDB UI.
menu:
v2_0:
parent: Manage checks
weight: 204
v2.0/tags: [monitor, checks, notifications]
---
If you no longer need a check, use the InfluxDB user interface (UI) to delete it.
{{% warn %}}
Deleting a check cannot be undone.
{{% /warn %}}
1. Click **Monitoring & Alerting** in the sidebar.
{{< nav-icon "alerts" >}}
2. In the **Checks** column, hover over the check you want to delete, click the
**{{< icon "delete" >}}** icon, then **Delete**.
After a check is deleted, all statuses generated by the check remain in the `_monitoring`
bucket until the retention period for the bucket expires.
{{% note %}}
You can also [disable a check](/v2.0/cloud/monitor-alert/checks/update/#enable-or-disable-a-check)
without having to delete it.
{{% /note %}}

View File

@ -0,0 +1,60 @@
---
title: Update checks
seotitle: Update monitoring checks in InfluxDB
description: >
Update, rename, enable or disable checks in the InfluxDB UI.
menu:
v2_0:
parent: Manage checks
weight: 203
v2.0/tags: [monitor, checks, notifications]
---
Update checks in the InfluxDB user interface (UI).
Common updates include:
- [Update check queries and logic](#update-check-queries-and-logic)
- [Enable or disable a check](#enable-or-disable-a-check)
- [Rename a check](#rename-a-check)
- [Add or update a check description](#add-or-update-a-check-description)
- [Add a label to a check](#add-a-label-to-a-check)
To update checks, click **Monitoring & Alerting** in the InfluxDB UI sidebar.
{{< nav-icon "alerts" >}}
## Update check queries and logic
1. In the **Checks** column, click the name of the check you want to update.
The check builder appears.
2. To edit the check query, click **1. Query** at the top of the check builder window.
3. To edit the check logic, click **2. Check** at the top of the check builder window.
_For details about using the check builder, see [Create checks](/v2.0/cloud/monitor-alert/checks/create/)._
## Enable or disable a check
In the **Checks** column, click the {{< icon "toggle" >}} toggle next to a check
to enable or disable it.
## Rename a check
1. In the **Checks** column, hover over the name of the check you want to update.
2. Click the **{{< icon "edit" >}}** icon that appears next to the check name.
2. Enter a new name and click out of the name field or press enter to save.
_You can also rename a check in the [check builder](#update-check-queries-and-logic)._
## Add or update a check description
1. In the **Checks** column, hover over the check description you want to update.
2. Click the **{{< icon "edit" >}}** icon that appears next to the description.
2. Enter a new description and click out of the name field or press enter to save.
## Add a label to a check
1. In the **Checks** column, click **Add a label** next to the check you want to add a label to.
The **Add Labels** box opens.
2. To add an existing label, select the label from the list.
3. To create and add a new label:
- In the search field, enter the name of the new label. The **Create Label** box opens.
- In the **Description** field, enter an optional description for the label.
- Select a color for the label.
- Click **Create Label**.
4. To remove a label, hover over the label under to a rule and click **{{< icon "x" >}}**.

View File

@ -0,0 +1,41 @@
---
title: View checks
seotitle: View monitoring checks in InfluxDB
description: >
View check details and statuses and notifications generated by checks in the InfluxDB UI.
menu:
v2_0:
parent: Manage checks
weight: 202
v2.0/tags: [monitor, checks, notifications]
---
View check details and statuses and notifications generated by checks in the InfluxDB user interface (UI).
- [View a list of all checks](#view-a-list-of-all-checks)
- [View check details](#view-check-details)
- [View statuses generated by a check](#view-statuses-generated-by-a-check)
- [View notifications triggered by a check](#view-notifications-triggered-by-a-check)
To view checks, click **Monitoring & Alerting** in the InfluxDB UI sidebar.
{{< nav-icon "alerts" >}}
## View a list of all checks
The **Checks** column on the Monitoring & Alerting landing page displays all existing checks.
## View check details
In the **Checks** column, click the name of the check you want to view.
The check builder appears.
Here you can view the check query and logic.
## View statuses generated by a check
1. In the **Checks** column, hover over the check, click the **{{< icon "view" >}}**
icon, then **View History**.
The Statuses History page displays statuses generated by the selected check.
## View notifications triggered by a check
1. In the **Checks** column, hover over the check, click the **{{< icon "view" >}}**
icon, then **View History**.
2. In the top left corner, click **Notifications**.
The Notifications History page displays notifications initiated by the selected check.

View File

@ -41,7 +41,7 @@
{{ else if or (eq $icon "refresh") (eq $icon "replay") }}
<span class="inline icon-ui-refresh middle small"></span>
{{ else if or (eq $icon "remove") (eq $icon "x") }}
<span class="inline icon-ui-remove middle small"></span>
<span class="inline icon-ui-remove top small"></span>
{{ else if eq $icon "search" }}
<span class="inline icon-ui-search middle small"></span>
{{ else if or (eq $icon "trash") (eq $icon "trashcan") (eq $icon "delete") }}
@ -54,6 +54,10 @@
<span class="inline icon-ui-nav-chat large"></span>
{{ else if eq $icon "chat" }}
<span class="inline icon-ui-chat large"></span>
{{ else if or (eq $icon "eye-open") (eq $icon "eye") (eq $icon "view") }}
<span class="inline icon-ui-eye-open large"></span>
{{ else if or (eq $icon "eye-closed") (eq $icon "hide") }}
<span class="inline icon-ui-eye-closed large"></span>
{{ else if eq $icon "add-label" }}
<span class="inline add-btn-round">&#59696;</span>
{{ else if eq $icon "toggle" }}

Binary file not shown.

View File

@ -71,6 +71,8 @@
<glyph unicode="&#xe941;" glyph-name="nav-chat" d="M729.327-192.311c-7.885 0-15.769 3.942-23.654 7.885l-279.904 208.942h-275.961c-59.135 0-110.385 55.192-110.385 110.385v346.924c0 59.135 55.192 114.327 110.385 114.327h721.443c59.135 0 114.327-55.192 114.327-114.327v-346.924c0-59.135-55.192-110.385-110.385-110.385h-106.442v-177.404c0-15.769-7.885-27.596-23.654-35.481-3.942-3.942-7.885-3.942-15.769-3.942zM149.808 517.305c-11.827 0-31.539-19.711-31.539-35.481v-346.924c0-15.769 19.711-31.539 31.539-31.539h287.789c7.885 0 15.769-3.942 23.654-7.885l224.711-169.52v137.981c0 23.654 15.769 39.423 39.423 39.423h145.865c15.769 0 31.539 19.711 31.539 31.539v346.924c3.942 15.769-15.769 35.481-27.596 35.481h-725.385z" />
<glyph unicode="&#xe94c;" glyph-name="map2" d="M672 576l-320 128-352-128v-768l352 128 320-128 352 128v768l-352-128zM384 622.27l256-102.4v-630.138l-256 102.398v630.14zM64 531.172l256 93.090v-631.8l-256-93.088v631.798zM960-19.172l-256-93.092v631.8l256 93.090v-631.798z" />
<glyph unicode="&#xe950;" glyph-name="disks" d="M512.5 769.971c-240.875 0-435.625-69.188-435.625-153.75v-166.563c0-84.563 194.75-153.75 435.625-153.75s435.625 69.188 435.625 153.75v166.563c0 84.563-194.75 153.75-435.625 153.75zM512.5 718.721c233.188 0 358.75-71.75 358.75-102.5s-125.563-102.5-358.75-102.5c-233.188 0-358.75 71.75-358.75 102.5s125.563 102.5 358.75 102.5zM76.875-101.28c0-84.563 194.75-153.75 435.625-153.75s435.625 69.188 435.625 153.75v205c0-84.563-194.75-153.75-435.625-153.75s-435.625 69.188-435.625 153.75v-205zM76.875 167.783c0-84.563 194.75-153.75 435.625-153.75s435.625 69.188 435.625 153.75v205c0-84.563-194.75-153.75-435.625-153.75s-435.625 69.188-435.625 153.75v-205z" />
<glyph unicode="&#xe956;" glyph-name="eye-closed" d="M1017.313 272.845c-41 76.875-99.938 143.5-171.688 192.188l-128.125-128.125c7.688-23.063 12.813-48.688 12.813-76.875 0-120.438-97.375-217.813-217.813-217.813-28.188 0-53.813 5.125-76.875 12.813l-82-82c51.25-12.813 105.063-20.5 158.875-20.5 215.25 0 407.438 112.75 504.813 292.125l7.688 12.813-7.688 15.375zM179.375 52.47l128.125 128.125c-7.688 23.063-12.813 48.688-12.813 76.875 0 120.438 97.375 217.813 217.813 217.813 28.188 0 53.813-5.125 76.875-12.813l82 82c-51.25 12.813-105.063 20.5-158.875 20.5-217.813 0-410-112.75-504.813-292.125l-7.688-15.375 7.688-15.375c41-76.875 99.938-140.938 171.688-189.625zM128.125-165.343c-10.25 0-20.5 2.563-28.188 10.25-15.375 15.375-15.375 38.438 0 53.813l768.751 768.751c15.375 15.375 38.438 15.375 53.813 0s15.375-38.438 0-53.813l-768.751-768.751c-5.125-7.688-15.375-10.25-25.625-10.25z" />
<glyph unicode="&#xe957;" glyph-name="eye-open" d="M1017.313 272.845c-97.375 179.375-289.563 292.125-504.813 292.125-217.813 0-410-112.75-504.813-292.125l-7.688-15.375 7.688-15.375c97.375-179.375 289.563-292.125 504.813-292.125s407.438 112.75 504.813 292.125l7.688 15.375-7.688 15.375zM512.5 39.657c-120.438 0-217.813 97.375-217.813 217.813s97.375 217.813 217.813 217.813 217.813-97.375 217.813-217.813-97.375-217.813-217.813-217.813zM550.938 295.908c-25.625 25.625-25.625 66.625 0 89.688 25.625 25.625 66.625 25.625 89.688 0s25.625-66.625 0-89.688c-25.625-25.625-64.063-25.625-89.688 0z" />
<glyph unicode="&#xe9da;" glyph-name="heart" d="M755.188 704c-107.63 0-200.258-87.554-243.164-179-42.938 91.444-135.578 179-243.216 179-148.382 0-268.808-120.44-268.808-268.832 0-301.846 304.5-380.994 512.022-679.418 196.154 296.576 511.978 387.206 511.978 679.418 0 148.392-120.43 268.832-268.812 268.832z" />
<glyph unicode="&#xea2e;" glyph-name="loop2" d="M889.68 601.68c-93.608 102.216-228.154 166.32-377.68 166.32-282.77 0-512-229.23-512-512h96c0 229.75 186.25 416 416 416 123.020 0 233.542-53.418 309.696-138.306l-149.696-149.694h352v352l-134.32-134.32zM928 256c0-229.75-186.25-416-416-416-123.020 0-233.542 53.418-309.694 138.306l149.694 149.694h-352v-352l134.32 134.32c93.608-102.216 228.154-166.32 377.68-166.32 282.77 0 512 229.23 512 512h-96z" />
<glyph unicode="&#xeab0;" glyph-name="github" d="M512.008 755.358c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Binary file not shown.