modify label value before query execution

25 views
Skip to first unread message

Uma Vardhini

unread,
Feb 22, 2024, 3:28:29 AM2/22/24
to Prometheus Users
Hi All

seeks assistance for.a syntax to modify or string manipulate the label value before query execution
Current
    devicelist=abc1,xyz1, lmn1
    rate(test_gauge{job="xyz" hostname="${devicelist:pipe}"})

 intended modification is to update the hostnames from abc1,xyz1, lmn2 to abc2,xyz2, lmn2. Is there an option to modify the query? I tried with label_replace function and played with regex but no luck
  any help is appreciated


Reply all
Reply to author
Forward
0 new messages