RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1430070 - RFE: Export pcp metrics in a format that Prometheus can consume
Summary: RFE: Export pcp metrics in a format that Prometheus can consume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcp
Version: 7.0
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: pcp-maint
QA Contact: Michal Kolar
URL:
Whiteboard:
Depends On: 1472153
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-07 19:28 UTC by Joe Handzik
Modified: 2018-04-10 17:05 UTC (History)
8 users (show)

Fixed In Version: pcp-3.12.2-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 17:04:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0926 0 None None None 2018-04-10 17:05:50 UTC

Description Joe Handzik 2017-03-07 19:28:52 UTC
Description of problem:

We at HPE (now combined with SGI) are interested in exporting PCP metrics for consumption within Prometheus either via core PCP itself or as a wrapper around individual PMDA components (removing the requirement for core PCP to be present in the environment). See the GSoC project listed here for more info: http://pcp.io/gsoc/2017/ideas.html#prometheus

Version-Release number of selected component (if applicable): N/A


How reproducible: N/A


Steps to Reproduce: N/A

Actual results: N/A


Expected results:N/A


Additional info: HPE is anticipating the availability of an intern resource to collaborate on development and senior engineers to supervise starting May 2017.

Comment 4 Frank Ch. Eigler 2018-02-13 12:05:01 UTC
A set of commits during the pcp 3.12 timeframe added this capability to pmwebd.  See the PROMETHEUS man page section in [man pmwebapi].  It works most easily if pmwebd is
started with some -h HOST parameters, so the NNNNN number(s) are fixed and
known in advance.

   PROMETHEUS
       Prometheus  exporting  of live metrics from a preexisting PMWEBAPI
       context is available:

       The general form of the requests is:

       /pmapi/NNNNN/metrics?target=NAME1,NAME2,...
              Fetch current values for given named metrics.

       For all numeric metrics with the given  NAME  prefixes,  create  a
       prometheus  text  export format giving their current value and re‐
       lated metadata.  The response  has  text/plain  type  rather  than
       JSON,  and  is  designed to be ingested by a Prometheus server, or
       pcp's own pmdaprometheus.

       The native PCP metric metadata (metric name, semantics and  units)
       are  first  output  with the # PCP prefix.  If the units string is
       empty, then none is output.  The units metadata string may contain
       spaces  and  extends  to  the  end of the line.  Prometheus metric
       types are  heuristically  inferred  from  PCP  metric  types,  and
       units/scales  are  converted to base seconds/bytes/count if possi‐
       ble, with a corresponding suffix added to the  metric  name.   PCP
       metric  names are mapped so that . are exchanged with :.  Instance
       domain instances are represented as Prometheus labels with  quoted
       instance names.

         # PCP proc.nprocs instant none
         # HELP proc:nprocs instantaneous number of processes
         # TYPE proc:nprocs gauge
         proc:nprocs 7

Comment 5 Michal Kolar 2018-02-21 15:04:51 UTC
Verified against pcp-3.12.2-5.el7.

Comment 9 errata-xmlrpc 2018-04-10 17:04:49 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/RHBA-2018:0926


Note You need to log in before you can comment on or make changes to this bug.