From c398fbc70fbe688a0c0cd778c4bf68f08af2a68c Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 12 Jul 2022 15:31:19 -0600 Subject: [PATCH] hotfix: update monitor states examples, closes #4187 --- content/enterprise_influxdb/v1.9/flux/guides/monitor-states.md | 2 +- content/influxdb/v2.0/query-data/flux/monitor-states.md | 2 +- content/influxdb/v2.1/query-data/flux/monitor-states.md | 2 +- content/influxdb/v2.2/query-data/flux/monitor-states.md | 2 +- content/influxdb/v2.3/query-data/flux/monitor-states.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/enterprise_influxdb/v1.9/flux/guides/monitor-states.md b/content/enterprise_influxdb/v1.9/flux/guides/monitor-states.md index 33a22916d..3c04fcdfc 100644 --- a/content/enterprise_influxdb/v1.9/flux/guides/monitor-states.md +++ b/content/enterprise_influxdb/v1.9/flux/guides/monitor-states.md @@ -106,7 +106,7 @@ calculates how many points have `closed` as their `_value`. ```js from(bucket: "doors") |> range(start: -5m) - |> stateDuration(fn: (r) => r._value == "closed", column: "door_closed") + |> stateCount(fn: (r) => r._value == "closed", column: "door_closed") ``` This example stores the **state count** in the `door_closed` column. diff --git a/content/influxdb/v2.0/query-data/flux/monitor-states.md b/content/influxdb/v2.0/query-data/flux/monitor-states.md index 116ef148f..d7c0ae2cc 100644 --- a/content/influxdb/v2.0/query-data/flux/monitor-states.md +++ b/content/influxdb/v2.0/query-data/flux/monitor-states.md @@ -105,7 +105,7 @@ The following query searches the `doors` bucket over the past 5 minutes and calc ```js from(bucket: "doors") |> range(start: -5m) - |> stateDuration(fn: (r) => r._value == "closed", column: "door_closed") + |> stateCount(fn: (r) => r._value == "closed", column: "door_closed") ``` This example stores the **state count** in the `door_closed` column. If you write data to the `doors` bucket every minute, the state count increases by `1` for each consecutive point where `_value` is `closed`. If `_value` is not `closed`, the state count is reset to `-1`. diff --git a/content/influxdb/v2.1/query-data/flux/monitor-states.md b/content/influxdb/v2.1/query-data/flux/monitor-states.md index 92268788a..6581ffaa7 100644 --- a/content/influxdb/v2.1/query-data/flux/monitor-states.md +++ b/content/influxdb/v2.1/query-data/flux/monitor-states.md @@ -105,7 +105,7 @@ The following query searches the `doors` bucket over the past 5 minutes and calc ```js from(bucket: "doors") |> range(start: -5m) - |> stateDuration(fn: (r) => r._value == "closed", column: "door_closed") + |> stateCount(fn: (r) => r._value == "closed", column: "door_closed") ``` This example stores the **state count** in the `door_closed` column. If you write data to the `doors` bucket every minute, the state count increases by `1` for each consecutive point where `_value` is `closed`. If `_value` is not `closed`, the state count is reset to `-1`. diff --git a/content/influxdb/v2.2/query-data/flux/monitor-states.md b/content/influxdb/v2.2/query-data/flux/monitor-states.md index 8b330621d..9786d7890 100644 --- a/content/influxdb/v2.2/query-data/flux/monitor-states.md +++ b/content/influxdb/v2.2/query-data/flux/monitor-states.md @@ -105,7 +105,7 @@ The following query searches the `doors` bucket over the past 5 minutes and calc ```js from(bucket: "doors") |> range(start: -5m) - |> stateDuration(fn: (r) => r._value == "closed", column: "door_closed") + |> stateCount(fn: (r) => r._value == "closed", column: "door_closed") ``` This example stores the **state count** in the `door_closed` column. If you write data to the `doors` bucket every minute, the state count increases by `1` for each consecutive point where `_value` is `closed`. If `_value` is not `closed`, the state count is reset to `-1`. diff --git a/content/influxdb/v2.3/query-data/flux/monitor-states.md b/content/influxdb/v2.3/query-data/flux/monitor-states.md index 6ddb18765..bc03597d6 100644 --- a/content/influxdb/v2.3/query-data/flux/monitor-states.md +++ b/content/influxdb/v2.3/query-data/flux/monitor-states.md @@ -105,7 +105,7 @@ The following query searches the `doors` bucket over the past 5 minutes and calc ```js from(bucket: "doors") |> range(start: -5m) - |> stateDuration(fn: (r) => r._value == "closed", column: "door_closed") + |> stateCount(fn: (r) => r._value == "closed", column: "door_closed") ``` This example stores the **state count** in the `door_closed` column. If you write data to the `doors` bucket every minute, the state count increases by `1` for each consecutive point where `_value` is `closed`. If `_value` is not `closed`, the state count is reset to `-1`.