Bug 1430070
Summary: | RFE: Export pcp metrics in a format that Prometheus can consume | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Joe Handzik <joseph.t.handzik> |
Component: | pcp | Assignee: | pcp-maint <pcp-maint> |
Status: | CLOSED ERRATA | QA Contact: | Michal Kolar <mkolar> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | brolley, fche, lberk, mcermak, mgoodwin, mkolar, myllynen, nathans |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | pcp-3.12.2-5.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 17:04:49 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: | |||
Bug Depends On: | 1472153 | ||
Bug Blocks: |
Description
Joe Handzik
2017-03-07 19:28:52 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 Verified against pcp-3.12.2-5.el7. 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 |