17 Apr 2025
12:53 PM
- last edited on
18 Apr 2025
08:14 AM
by
MaciejNeumann
Hi all,
I am running this query, so far so good, it works.
timeseries avg(dt.host.disk.used.percent), interval:2h, by: { host.name, dt.entity.host_group, dt.entity.disk }
, filter: { matchesValue(entityAttr(dt.entity.host_group, "entity.name"), $HostGroup) }
| fieldsAdd dt.entity.host_group.name = entityName(dt.entity.host_group),dt.entity.disk.name = entityName(dt.entity.disk)
| fieldsAdd array_max = arrayMax(`avg(dt.host.disk.used.percent)`)
| filterOut array_max < toDouble($disk_threshold)
The $ signs are the variables defined in my dashboard. You can replace them with a host group name you have and a random disk threshold, for example 70.
Nevertheless, when I switch to the Davis forecaster, I get this error message. Even if I only want to predict one datapoint I see this message (yes I have more than 1 datapoint) and the refresh icon keeps on spinning (tiles are being loaded). Am I looking at a bug or am I doing something wrong?
I checked with different timeframes and intervals, if I use a small recent timeframe, it works. Is the disk with the single data point (first image, blue dot) crashing the forecaster? This should not happen, right?
Solved! Go to Solution.
17 Apr 2025 09:15 PM
Okay I solved my own problem :D. The single datapoint of a disk that was only present for a moment kills the analyzer. So if I want to predict the next 7 days based on the last 7, I will need to filter out all disks which do not have sufficient data. As I use 2 hour intervals and 7 days have 84 2-hour intervals, I will filter out all disks with an array size < 84. To be honest, I still consider this a bug which should be fixed though.
timeseries avg(dt.host.disk.used.percent), interval:2h, by: { host.name, dt.entity.host_group, dt.entity.disk }
, filter: { matchesValue(entityAttr(dt.entity.host_group, "entity.name"), $HostGroup) }
| fieldsAdd dt.entity.host_group.name = entityName(dt.entity.host_group),dt.entity.disk.name = entityName(dt.entity.disk)
| fieldsAdd array_max = arrayMax(avg(dt.host.disk.used.percent))
| filterOut array_max < toDouble($disk_threshold)
| filterOut arraySize(avg(dt.host.disk.used.percent))<84