Error Unknown key for a VALUE_NUMBER
when using EWMA/Holt-Winter with Moving Average
#98
Labels
Unknown key for a VALUE_NUMBER
when using EWMA/Holt-Winter with Moving Average
#98
When trying to use Moving Average aggregation with EWMA or Holt-Winters model (https://opensearch.org/docs/latest/opensearch/pipeline-agg/#moving_avg), the query fails with:
Tried this on both Grafana 8 and plugin version v1.2.4 and Grafana 9 with plugin v2.0.4, with the same error.
I have tracked down the error and it seems it is caused by using
parseInt
foralpha
/betta
/gamma
parameters while OpenSearch expects a float.(https://github.com/grafana/opensearch-datasource/blob/v2.0.5/src/components/QueryEditor/MetricAggregationsEditor/SettingsEditor/MovingAverageSettingsEditor.tsx#L44).
I think that changing the
parseInt
toparseFloat
should fix the problem.The Elasticsearch plugin works fine with the same query using Moving Average with EWMA as they do not use
parseInt
when getting the value for alpha/beta/gamma settings (https://github.com/grafana/grafana/blob/v9.3.6/public/app/plugins/datasource/elasticsearch/components/QueryEditor/MetricAggregationsEditor/SettingsEditor/MovingAverageSettingsEditor.tsx#L50).The text was updated successfully, but these errors were encountered: