I enjoyed reading the blog entry on the InfluxDB’s Checks and Notifications System (InfluxDB's Checks and Notifications System | InfluxData).
I believe I spotted a small error (or I misunderstood something and would be happy for an explanation )
The flux code for the notification rules contains the following section:
statuses = monitor["from"](start: -10s, fn: (r) = r["_check_name"] == "CPU Check") crit = statuses |> filter(fn: (r) => r["_level"] == "crit") all_statuses = crit |> filter(fn: (r) => (r["_time"] >= experimental["subDuration"](from: now(), d: 10m)))
statuses contain the last 10 seconds (
start: -10s) only.
However, later on
all_statuses contains a filter that removes all entries that are older than 10 minutes. Also the task itself is scheduled every 10 minutes.
statuses contain the last 10 minutes (
start: -10m) instead? Else one might miss events that happend within the first 600-10=590 seconds?
Thanks already for any reply!