Documentation

monitor.stateChangesOnly() function

The monitor.stateChangesOnly() function takes a stream of tables that contains a _level column and returns a stream of tables where each record represents a state change.

Function type: Transformation

import "influxdata/influxdb/monitor"

monitor.stateChangesOnly()

Examples

Return records representing state changes
import "influxdata/influxdb/monitor"


monitor.from(start: -1h)
  |> monitor.stateChangesOnly()

Given the following input:

_time_level
0001ok
0002ok
0003warn
0004crit

monitor.stateChangesOnly() outputs:

_time_level
0002ok
0003warn
0004crit

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: