WIP added monitor.logs, working on monitor.deadman
parent
31e669f590
commit
428faa0ee8
|
@ -12,7 +12,7 @@ weight: 202
|
|||
v2.0/tags: [functions, monitor, alerts, package]
|
||||
---
|
||||
|
||||
Monitor Flux functions provide tools for monitoring and alerting.
|
||||
Monitor Flux functions provide tools for monitoring and alerting with InfluxDB.
|
||||
Import the `influxdata/influxdb/monitor` package:
|
||||
|
||||
```js
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
---
|
||||
title: monitor.deadman() function
|
||||
description: The `monitor.deadman()` function ...
|
||||
description: >
|
||||
The `monitor.deadman()` function detects when a group stops reporting data.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: monitor.deadman
|
||||
parent: Monitor
|
||||
weight: 202
|
||||
cloud_all: true
|
||||
---
|
||||
|
||||
The `monitor.deadman()` function ...
|
||||
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.
|
||||
|
||||
_**Function type:** Type conversion_
|
||||
_**Function type:** Transformation_
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/monitor"
|
||||
|
||||
monitor.deadman(...)
|
||||
monitor.deadman(t: -3m)
|
||||
```
|
||||
|
||||
`monitor.deadman()` retains the most recent row from each input table.
|
||||
It adds a `dead` column to output tables.
|
||||
If a group or series and sets it to `true` if the row's gro
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: monitor.logs() function
|
||||
description: The `monitor.logs()` function ...
|
||||
description: >
|
||||
The `monitor.logs()` function retrieves notification events stored in the `_monitoring` bucket.
|
||||
menu:
|
||||
v2_0_ref:
|
||||
name: monitor.logs
|
||||
|
@ -8,29 +9,58 @@ menu:
|
|||
weight: 202
|
||||
---
|
||||
|
||||
The `monitor.logs()` function ...
|
||||
The `monitor.logs()` function retrieves notification events stored in the `_monitoring` bucket.
|
||||
|
||||
_**Function type:** Type conversion_
|
||||
_**Function type:** Input_
|
||||
|
||||
```js
|
||||
import "influxdata/influxdb/monitor"
|
||||
|
||||
monitor.logs(...)
|
||||
monitor.logs(
|
||||
start: -1h,
|
||||
stop: now(),
|
||||
fn: (r) => true
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
## Parameters
|
||||
|
||||
### v
|
||||
The value to convert.
|
||||
### start
|
||||
The oldest time to include in results.
|
||||
|
||||
_**Data type:** Boolean | Duration | Float | Integer | String | Time | UInteger_
|
||||
Relative start times are defined using negative durations.
|
||||
Negative durations are relative to now.
|
||||
Absolute start times are defined using timestamps.
|
||||
|
||||
_**Data type:** Duration | Time_
|
||||
|
||||
### stop
|
||||
The newest time to include in the results.
|
||||
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.
|
||||
{{% /note %}}
|
||||
|
||||
### fn
|
||||
A single argument predicate function that evaluates `true` or `false`.
|
||||
Records or rows (`r`) that evaluate to `true` are included in output tables.
|
||||
Records that evaluate to _null_ or `false` are not included in output tables.
|
||||
|
||||
_**Data type:** Function_
|
||||
|
||||
## Examples
|
||||
|
||||
### ...
|
||||
### Query notification events from the last hour
|
||||
```js
|
||||
import "influxdata/influxdb/monitor"
|
||||
|
||||
monitor.logs(...)
|
||||
monitor.logs(start: -1h)
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue