[ZBXNEXT-7604] Prometheus preprocessing functions to ignore NaN Created: 2022 Apr 05  Updated: 2024 Oct 28  Resolved: 2022 May 24

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Proxy (P), Server (S)
Affects Version/s: 6.0.3, 6.2.0alpha1
Fix Version/s: 6.0.5rc1, 6.2.0beta2, 6.2 (plan)

Type: Change Request Priority: Major
Reporter: Vjaceslavs Bogdanovs Assignee: Andrejs Kozlovs
Resolution: Fixed Votes: 0
Labels: preprocessing, prometheus
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Sub-task
part of ZBXNEXT-7453 Integration with HashiCorp Consul Closed
Team: Team C
Sprint: Sprint 87 (Apr 2022), Sprint 88 (May 2022)
Story Points: 1

 Description   

The current implementation of the Prometheus functions doesn't allow NaN filtering. And the result of aggregation functions working with NaN always gives NaN as a result.

This logic should be changed to ignore NaN values in the data set.



 Comments   
Comment by Andris Mednis [ 2022 Apr 27 ]

This logic should be changed to ignore NaN values in the data set.

We need to agree what to do if all values are ignored.

"avg", "min", "max" aggregate functions FAIL with error "not enough data" (we propose to modify error message to "no data (at least one value is required)".

"count" returns 0.

The problematic one is "sum". It returns 0 in case no data values. We propose to modify "sum" to behave like "avg", "min", "max" - to FAIL with error "no data (at least one value is required)"). But there might be other opinions.

Comment by Andrejs Kozlovs [ 2022 May 09 ]

Available in:

Comment by Andrejs Kozlovs [ 2022 May 11 ]

Documentation changed:

Added to "What's new" for 6.0.5

Generated at Sat Jun 06 03:49:24 EEST 2026 using Jira 10.3.18#10030018-sha1:5642e4ad348b6c2a83ebdba689d04763a2393cab.