1.4 KiB
title | description | menu | weight | ||||||
---|---|---|---|---|---|---|---|---|---|
monitor.from() function | The `monitor.from()` function retrieves check statuses stored in the `_monitoring` bucket. |
|
202 |
The monitor.from()
function retrieves check statuses stored in the _monitoring
bucket.
Function type: Input
import "influxdata/influxdb/monitor"
monitor.from(
start: -1h,
stop: now(),
fn: (r) => true
)
Parameters
start
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 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()
.
Data type: Duration | Time
{{% note %}} Time values in Flux must be in RFC3339 format. {{% /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
View critical check statuses from the last hour
import "influxdata/influxdb/monitor"
monitor.from(
start: -1h,
fn: (r) => r._level == "crit"
)