cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot read properties of undefined (reading 'metrics) error for Davis forecast

marina_pollehn
DynaMight Champion
DynaMight Champion

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.

marina_pollehn_0-1744890997625.png

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?

marina_pollehn_0-1744890602270.png

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?

A Dynatrace Professional nerd working for Conclusion Xforce
1 REPLY 1

marina_pollehn
DynaMight Champion
DynaMight Champion

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

A Dynatrace Professional nerd working for Conclusion Xforce

Featured Posts