Bug 1784862

Summary: Wildcard legends in Grafana-PCP
Product: Red Hat Enterprise Linux 8 Reporter: Lukas Zapletal <lzap>
Component: grafana-pcpAssignee: Andreas Gerstmayr <agerstmayr>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: agerstmayr, jkurik, mgoodwin, mnewsome, nathans, patrickm
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:58:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Zapletal 2019-12-18 14:19:30 UTC
Description of problem:

I am trying PCP 5.0.2 with the all-new Grafana and so far so good, but I have a problem with displaying multiple metrics on a single graph. Say I want to display disk.dev.* all on one graph. If I put this to the query (with the wildcard) it wimply renders two dozens of legends with "vda". Not very useful, when I try to put $metric to the label field I expect the legend to show full metric name, however it simply displays "disk.dev.*" for all legends. There is also quite useful variable $metric0 which is exactly what I want (to display the last element of the metric name), however it displays "*" for all legends again.

I've managed to display "Value" for all legends too, however I am unable to reproduce this with standard metrics only with my own data. Here is the archive, the metric tree in question is:

mmv.fm_rails_activerecord_instances.*

These are counters of some object instances, for some reason PCP instance is not used (this has been fixed with statsd PMDA in PCP5 however I still need to be able to send from old version).

https://lzap.fedorapeople.org/temp/mmv-grafana-labels.tar.xz

Version: 5.0.2-1

Comment 1 Andreas Gerstmayr 2019-12-18 14:37:57 UTC
Bug is confirmed and fixed in upstream (1.x branch):

commit c178548bb96d823444e3cfcc53d69477e80a2471
Author: Andreas Gerstmayr <agerstmayr>
Date:   Wed Dec 18 12:29:09 2019 +0100

    redis: support wildcards in metric names

Comment 2 Andreas Gerstmayr 2020-01-07 14:12:39 UTC
Bug is fixed in grafana-pcp 1.0.5-2

Comment 4 Jan Kurik 2020-01-15 10:34:38 UTC
Legend "$metric" and "$metric0" works as expected when using grafana-pcp 1.0.5-2 build.

Comment 6 errata-xmlrpc 2020-04-28 15:58:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:1681