updated monitor package docs to address PR feedback
parent
302b9b0171
commit
cb74dbffe3
|
@ -26,26 +26,24 @@ range(start: -15m, stop: now())
|
|||
## Parameters
|
||||
|
||||
### start
|
||||
Specifies the oldest time to be included in the results.
|
||||
The earliest time to include in results.
|
||||
Use a relative duration or absolute time.
|
||||
For example, `-1h` or `2019-08-28T22:00:00Z`.
|
||||
Durations are relative to `now()`.
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute start times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration or Timestamp_
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
### stop
|
||||
Specifies the newest time to be included in the results. Defaults to `now`.
|
||||
The latest time to include in results.
|
||||
Use a relative duration or absolute time.
|
||||
For example, `-1h` or `2019-08-28T22:00:00Z`.
|
||||
Durations are relative to `now()`.
|
||||
Defaults to `now()`.
|
||||
|
||||
Relative stop times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute stop times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration or Timestamp_
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
{{% note %}}
|
||||
Flux only honors [RFC3339 timestamps](/v2.0/reference/flux/language/types#timestamp-format)
|
||||
and ignores dates and times provided in other formats.
|
||||
Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format).
|
||||
{{% /note %}}
|
||||
|
||||
## Examples
|
||||
|
|
|
@ -12,7 +12,7 @@ weight: 202
|
|||
v2.0/tags: [functions, monitor, alerts, package]
|
||||
---
|
||||
|
||||
Monitor Flux functions provide tools for monitoring and alerting with InfluxDB.
|
||||
The Flux monitor package provides tools for monitoring and alerting with InfluxDB.
|
||||
Import the `influxdata/influxdb/monitor` package:
|
||||
|
||||
```js
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: monitor.check() function
|
||||
description: >
|
||||
The `monitor.check()` function performs a check against input data and assigns an `ok`,
|
||||
`info`, `warn` or `crit`level to each row based on user-specified predicate functions.
|
||||
The `monitor.check()` function function checks input data and assigns a level
|
||||
(`ok`, `info`, `warn`, or `crit`) to each row based on predicate functions.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: monitor.check
|
||||
|
@ -10,10 +10,8 @@ menu:
|
|||
weight: 202
|
||||
---
|
||||
|
||||
The `monitor.check()` function performs a check against input data and assigns an `ok`,
|
||||
`info`, `warn` or `crit` level to each row based on user-specified predicate functions.
|
||||
The function stores statuses in the `_level` column and writes all check results to the
|
||||
`statuses` measurement in the `_monitoring` bucket.
|
||||
The `monitor.check()` function function checks input data and assigns a level
|
||||
(`ok`, `info`, `warn`, or `crit`) to each row based on predicate functions.
|
||||
|
||||
_**Function type:** Transformation_
|
||||
|
||||
|
@ -30,6 +28,9 @@ monitor.check(
|
|||
)
|
||||
```
|
||||
|
||||
`monitor.check()` stores statuses in the `_level` column and writes results
|
||||
to the `statuses` measurement in the `_monitoring` bucket.
|
||||
|
||||
## Parameters
|
||||
|
||||
### crit
|
||||
|
@ -63,7 +64,7 @@ The message is stored in the `_message` column.
|
|||
_**Data type:** Function_
|
||||
|
||||
### data
|
||||
Data to append to the to output data.
|
||||
Data to append to the output.
|
||||
**InfluxDB populates check data.**
|
||||
|
||||
_**Data type:** Object_
|
||||
|
|
|
@ -11,8 +11,7 @@ cloud_all: true
|
|||
---
|
||||
|
||||
The `monitor.deadman()` function detects when a group stops reporting data.
|
||||
It takes a stream of tables and reports which groups or series are
|
||||
observed before time `t`, but not after.
|
||||
It takes a stream of tables and reports if groups have been observed since time `t`.
|
||||
|
||||
_**Function type:** Transformation_
|
||||
|
||||
|
@ -23,8 +22,8 @@ monitor.deadman(t: -3m)
|
|||
```
|
||||
|
||||
`monitor.deadman()` retains the most recent row from each input table and adds a `dead` column.
|
||||
It sets `dead` to `true` if the record appears before time `t`.
|
||||
It sets `dead` to `false` if the group appears after time `t`.
|
||||
If a record appears **after** time `t`, `monitor.deadman()` sets `dead` to `false`.
|
||||
Otherwise, `dead` is set to `true`.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -27,27 +27,24 @@ monitor.from(
|
|||
## Parameters
|
||||
|
||||
### start
|
||||
The oldest time to include in results.
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute start times are defined using timestamps.
|
||||
The earliest time to include in results.
|
||||
Use a relative duration or absolute time.
|
||||
For example, `-1h` or `2019-08-28T22:00:00Z`.
|
||||
Durations are relative to `now()`.
|
||||
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
### stop
|
||||
The newest time to include in the results.
|
||||
The latest time to include in results.
|
||||
Use a relative duration or absolute time.
|
||||
For example, `-1h` or `2019-08-28T22:00:00Z`.
|
||||
Durations are relative to `now()`.
|
||||
Defaults to `now()`.
|
||||
|
||||
Relative stop times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute stop times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
{{% note %}}
|
||||
Flux only honors [RFC3339 timestamps](/v2.0/reference/flux/language/types#timestamp-format)
|
||||
and ignores dates and times provided in other formats.
|
||||
Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format).
|
||||
{{% /note %}}
|
||||
|
||||
### fn
|
||||
|
|
|
@ -26,27 +26,24 @@ monitor.logs(
|
|||
## Parameters
|
||||
|
||||
### start
|
||||
The oldest time to include in results.
|
||||
|
||||
Relative start times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute start times are defined using timestamps.
|
||||
The earliest time to include in results.
|
||||
Use a relative duration or absolute time.
|
||||
For example, `-1h` or `2019-08-28T22:00:00Z`.
|
||||
Durations are relative to `now()`.
|
||||
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
### stop
|
||||
The newest time to include in the results.
|
||||
The latest time to include in results.
|
||||
Use a relative duration or absolute time.
|
||||
For example, `-1h` or `2019-08-28T22:00:00Z`.
|
||||
Durations are relative to `now()`.
|
||||
Defaults to `now()`.
|
||||
|
||||
Relative stop times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute stop times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
{{% note %}}
|
||||
Flux only honors [RFC3339 timestamps](/v2.0/reference/flux/language/types#timestamp-format)
|
||||
and ignores dates and times provided in other formats.
|
||||
Time values in Flux must be in [RFC3339 format](/v2.0/reference/flux/language/types#timestamp-format).
|
||||
{{% /note %}}
|
||||
|
||||
### fn
|
||||
|
|
|
@ -32,7 +32,7 @@ A function that constructs and sends the notification to an endpoint.
|
|||
_**Data type:** Function_
|
||||
|
||||
### data
|
||||
Data to append to output data.
|
||||
Data to append to the output.
|
||||
**InfluxDB populates notification data.**
|
||||
|
||||
_**Data type:** Object_
|
||||
|
|
Loading…
Reference in New Issue