Influxdb 2.0.4 keeps sending me notifications from inactive tasks.
- I’ve a simple check for test purposes and it checks cpu usage and returns status, info.
- I’ve a simple notification rule which sends notifications every 1m on ANY status.
- The check is inactive, so I expect it to not run.
Even though it sends once in a minute to the endpoint, it shows the same notification twice. Why?
Status:
Check:
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/schema"
option task = {name: "CPU Check 2", every: 1m, offset: 10s}
check = {
_check_id: "0000000000000002",
_check_name: "CPU Check 2",
_type: "custom",
tags: {},
}
data = from(bucket: "tutorial")
|> range(start: -1m)
|> filter(fn: (r) =>
(r["_measurement"] == "cpu" and r["_field"] == "usage_user" and r["cpu"] == "cpu-total"))
|> mean()
|> duplicate(column: "_stop", as: "_time")
|> last()
data
|> schema.fieldsAsCols()
|> monitor["check"](
crit: (r) =>
(r["usage_user"] > 99.9),
warn: (r) =>
(r["usage_user"] > 99.8),
info: (r) =>
(r["usage_user"] > 1.0),
ok: (r) =>
(r["usage_user"] <= 1.0),
messageFn: (r) =>
(if r._level == "ok" then "Things are looking good." else "Level: ${r._level} Value: ${string(v: r._value)}%"),
data: check,
)
The check is inactive but it still runs every minute. Am I missing something?