Create checks
Create a check in the InfluxDB user interface (UI). Checks query data and apply a status to each point based on specified conditions.
Parts of a check
A check consists of two parts – a query and check configuration.
Check query
- Specifies the dataset to monitor.
- 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
ok
- Stores status in the
_level
column.
Check types
There are two types of checks:
Threshold check
A threshold check assigns a status based on a value being above, below, inside, or outside of defined thresholds.
Deadman check
A deadman check assigns a status to data when a series or group doesn’t report in a specified amount of time.
Create a check
-
In the navigation menu on the left, select Alerts > Alerts.
-
Click Create and select the type of check to create.
-
Click Name this check in the top left corner and provide a unique name for the check, and then do the following:
-
(Optional) In the Name this check field at the top, enter a unique name for the check.
Configure the check query
-
Select the bucket, measurement, field and tag sets to query.
-
If creating a threshold check, select an aggregate function. Aggregate functions aggregate data between the specified check intervals and return a single value for the check to process.
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.
-
Click Submit to run the query and preview the results. To see the raw query results, click the View Raw Data toggle.
Configure the check
-
Click 2. Configure Check near the top of the window.
-
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.
Your offset must be shorter than your check interval.
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.
-
In the Status Message Template column, enter the status message template for the check. Use Flux string interpolation to populate the message with data from the query.
Check data is represented as a record,
r
. Access specific column values using dot notation:r.columnName
.Use data from the following columns:
- columns included in the query output
- custom 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.field_name)}.
When a check generates a status, it stores the message in the
_message
column. -
Define check conditions that assign statuses to points. Condition options depend on your check type.
Configure a threshold check
- In the Thresholds column, click the status name (CRIT, WARN, INFO, or OK) to define conditions for that specific status.
- From the When value drop-down list, select a threshold: is above, is below, is inside of, is outside of.
- 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
- In the Deadman column, enter a duration for the deadman check in the for field.
For example,
90s
,5m
,2h30m
, etc. - Use the set status to drop-down list to select a status to set on a dead series.
- In the And stop checking after field, enter the time to stop monitoring the series.
For example,
30m
,2h
,3h15m
, etc.
-
Click the green in the top right corner to save the check.
Clone a check
Create a new check by cloning an existing check.
-
Go to Alerts > Alerts in the navigation on the left.
-
Click the icon next to the check you want to clone and then click Clone.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.