[ZBX-25325] Prometheus: Preprocessing failed - multiple comments found Created: 2024 Oct 01 Updated: 2024 Oct 25 Resolved: 2024 Oct 25 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 7.0.4 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Arina Lebedeva | Assignee: | Tomasz Grzechulski |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | items | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() |
Description |
After upgrade from 6.4 to 7.0.4 there is a problem with pre-processing of data in Prometneus format. I'm monitoring an Azure Kubernetes cluster and have an item that makes multiple API calls to get cAdvisor metrics from x nodes. The item's output contains metrics from x nodes in Prometheus format (see below):
# HELP cadvisor_version_info A metric with a constant '1' value labeled by kernel version, OS version, docker version, cadvisor version & cadvisor revision. # TYPE cadvisor_version_info gauge cadvisor_version_info{cadvisorRevision="",cadvisorVersion="",dockerVersion="",kernelVersion="5.15.0-1071-azure",osVersion="Ubuntu 22.04.4 LTS"} 1 # HELP container_blkio_device_usage_total Blkio Device bytes usage # TYPE container_blkio_device_usage_total counter container_blkio_device_usage_total{container="",device="",id="/",image="",major="11",minor="0",name="",namespace="",operation="Read",pod=""} 2.7058176e+07 1727772781281 container_blkio_device_usage_total{container="",device="",id="/",image="",major="11",minor="0",name="",namespace="",operation="Write",pod=""} 0 1727772781281 container_blkio_device_usage_total{container="",device="/dev/sda",id="/",image="",major="8",minor="0",name="",namespace="",operation="Read",pod=""} 1.713661952e+09 1727772781281
When I try to extract any metric using preprocessing (Prometheus pattern), I get an error: Preprocessing failed for: # HELP cadvisor_version_info A metric with a constant '1' value labeled by kernel version, OS ver... 1. Failed: cannot apply Prometheus pattern: data parsing error at row 3213 "# HELP cadvisor_version_info A metric with a const...": multiple HELP comments found for metric "cadvisor_version_info" After upgrade I didn’t change any configuration. |
Comments |
Comment by Tomasz Grzechulski [ 2024 Oct 03 ] |
Hello Arina, Thank you for reporting this issue, If that would be possible, could you please share with us logs of your Zabbix Server? And to have better understanding - this item that you're using is your custom item, right? Or it's from some of Zabbix templates? Regards, Tomasz |
Comment by Arina Lebedeva [ 2024 Oct 04 ] |
Hello Tomasz, unfortunately, I’m not able to share logs with you but I uploaded a template where you find all the necessary information to understand what exactly I'm doing. Arina |
Comment by Tomasz Grzechulski [ 2024 Oct 15 ] |
Hello Arina, Thank you for template, Thank you, |
Comment by Arina Lebedeva [ 2024 Oct 16 ] |
Hello Tomasz, it's my own template. Best regards,
|
Comment by Tomasz Grzechulski [ 2024 Oct 17 ] |
Hello Arina, Thank you for clarification, Thank you, |
Comment by Arina Lebedeva [ 2024 Oct 25 ] |
Hello Tomasz, you may not have been able to reproduce the error because you were likely using only one node. When cAdvisor metrics are collected from multiple nodes, the output includes duplicate comments, which causes issues during preprocessing. If you remove all comments with JavaScript, the preprocessing completes without errors. I use custom templates to collect metrics not included in Zabbix’s default templates. Additionally, I have created template for namespaces, as Zabbix doesn’t provide templates for namespaces itself. This isn’t a critical issue for me since I can increase the script timeout, but this problem wasn’t present in previous versions. I just wanted to let you know about this new inconvenience in the latest version of Zabbix. Best regards, |