Werk #16150: Forecasting: Stricter checks for missing data

Komponente Metrics system
Titel Forecasting: Stricter checks for missing data
Datum 26.09.2023
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen
Checkmk versions & editions
2.3.0b1 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p12 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p35 Checkmk Enterprise (CEE), Checkmk MSP (CME)

When computing forecasts for forecast graphs or views, Checkmk now strictly validates the input RRD data and produces an error in case there are missing data points. The produced error message reads:

Historic metric data is incomplete. You can try to mitigate this by shortening the considered
history. Latest missing data point:
2023-09-26T00:00:00+00:00

Before this werk, missing data was handled inconsistently and partially incorrectly. Note that this change also solves crashes such as

Traceback (most recent call last):
    ...
    y_hat = y_hat[display_time]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 176 but corresponding boolean dimension is 177

These crashes were caused by handling missing data incorrectly. Instead, we now display the error message mentioned above.

Note that depending on the exact configuration, certain forecasts will now show the error message mentioned above, whereas before this change, a forecast was computed. We explicitly prefer this over showing potentially incorrect forecasts. Also note that we explicitly chose to not fill in missing data points eg. by interpolating, since this can lead to unreliable forecasts.

Zur Liste aller Werks