pcp
pcp copied to clipboard
Push PCP metrics to Prometheus
How to expose pcp metrics to Prometheus? Can fluentbit be leveraged push metrics to Prometheus remote write?
pmproxy(1) provies a /metrics endpoint - see the pmwebapi(3) man page for more details.
Actual question was around how to push metrics to Prometheus instead of Prometheus pulling from target pmproxy which may not suit well for enterprise environment.
To achieve what you're after we'd need a pcp2prometheus or pcp2openmetrics utility I think. It doesn't exist yet but there are many similar tools in PCP - it would be great if someone were to take this one on (little python project).
Some sample python code I wrote a little while ago that may be useful here. It show's how to convert PCP metric metadata into openmetrics format: https://gist.github.com/natoscott/5186664bab2ebbba8e7596f81d3d5feb
Thanks for prompt response.
we’re thinking to use this as an alternative provided fluentbit is enabled every collector host. Do you have any thoughts or concerns?
https://docs.fluentbit.io/manual/pipeline/outputs/prometheus-remote-write#
pcp2json + fluentbit -> Prometheus remote write
No reason it wont work AFAICT. It would be more efficient to combine the pcp2json+fluentbit into a single pcp2openmetrics script though, but I guess you need to work with what is available today.
pcp2openmetrics(1) exists since pcp-6.2.1.