-
Bug
-
Resolution: Done
-
Undefined
-
None
-
rhel-9.5
-
None
-
None
-
None
-
1
-
rhel-sst-pt-pcp
-
ssg_platform_tools
-
1
-
None
-
PCP Sprint 6
-
None
-
None
-
None
What were you trying to do that didn't work?
Exporting metrics using pcp2openmetrics tools generates invalid openmetrics format
Please provide the package NVR for which bug is seen:
pcp-6.2.2-1.el9
How reproducible:
Always
Steps to reproduce
- Start pmcd and pmlogger
# systemctl restart pmcd pmlogger
- Run the following command
# pcp2openmetrics -a $(ls -1 /var/log/pcp/pmlogger/$(hostname)/*.0 | tail -n 1) -s 1 -F /tmp/x 'hinv.ncpu'
- Check the output in /tmp/x file
# cat /tmp/x
Expected results
The /tmp/x file contains data in valid openmetrics format, which can be directly consumed by i.e. pcp-pmda-openmetrics
Actual results
# cat /tmp/x Metric hinv.ncpu details (last fetch: 1716990636) :# PCP5 hinv_ncpu 60.0.32 u32 PM_INDOM_NULL discrete # HELP hinv_ncpu number of CPUs in the system # TYPE hinv_ncpu gauge hinv_ncpu{domainname="localdomain",groupid="993",hostname="vm-10-0-186-57.hosted.upshift.rdu2.redhat.com",machineid="03640ff5862a45f5b2944e3ded241caa",userid="993",agent="linux"} 1 1716990636.2064
Major issues in the openmetrics file are the following:
- It contains a comment "Metric hinv.ncpu details (last fetch: 1716990636)" which is considered by pcp-pmda-openmetrics as a definition of a new metric.
- There is colon at the beginning of the line ":# PCP5 hinv_ncpu 60.0.32 u32 PM_INDOM_NULL discrete" - this makes i.e. the pcp-pmda-openmetrics fail to parse the file.
- split from
-
RHEL-39159 Invalid openmetrics format generated by pcp2openmetrics tool
- Closed