[ZBX-19737] Prometheus pattern returns wrong matching metrics selecting by label name and value Created: 2021 Jul 27  Updated: 2024 Oct 28  Resolved: 2021 Aug 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 5.0.15rc1, 5.4.3
Fix Version/s: 5.0.15rc1, 5.4.4rc1, 6.0.0alpha1, 6.0 (plan)

Type: Problem report Priority: Minor
Reporter: Andrejs Zazuks Assignee: Jurijs Klopovskis
Resolution: Fixed Votes: 0
Labels: postprocessing, prometheus
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File multiple_finds.png     Microsoft Word prometheus_output.docx    
Issue Links:
Duplicate
Team: Team B
Sprint: Sprint 79 (Aug 2021)
Story Points: 1

 Description   

Steps to reproduce:

  1. Create a host
  2. Create an Item with "HTTP agent" type
  3. Create a Dependent item for the Item from step 2
  4. Add a "Prometheus pattern" Preprocessing step with Parameter where label name and label value match only one metric (Example: {event="add",role="endpoints"})
  5. Press Test action for the Preprocessing step
  6. Add the Value from attached file prometheus_output.docx
  7. Press Test action button
  8. Observe, that found multiple metrics, even without label from step 4

Result:
Preprocessing step founds metrics which are not matching searching parameters. Please, see screenshot multiple_finds.png

Also related to the Prometheus to JSON preprocessing step.

Expected:
Preprocessing step returns metrics that match searching parameters only. (prometheus_sd_kubernetes_events_total metric in example)



 Comments   
Comment by Jurijs Klopovskis [ 2021 Aug 09 ]

Available in:

Generated at Fri Mar 14 13:20:33 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.