Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 7. Configuring pmda-openmetrics


Performance Co-Pilot (PCP) is a flexible and extensible system for monitoring and managing system performance. It includes several built-in agents called Performance Metric Domain Agents (PMDAs) that collect metrics from commonly used applications and services, such as PostgreSQL, Apache HTTPD, and KVM virtual machines.

7.1. Overview of pmda-openmetrics

You can run custom or less common applications for which no out-of-the-box PMDA exists in the Red Hat repositories. In such scenarios, the pmda-openmetrics agent helps to bridge the gap. The pmda-openmetrics PMDA exposes performance metrics from arbitrary applications by converting OpenMetrics-style formatted text files into PCP-compatible metrics. OpenMetrics is a widely adopted format used by Prometheus and other monitoring tools, which makes integration easier.

You can run pmda-openmetrics to do the following tasks:

  • Monitor custom applications that are not covered by existing PMDAs.
  • Integrate existing OpenMetrics or Prometheus-exported metrics into the PCP framework.
  • Create quick models or test metrics for diagnostic or demonstration purposes.

7.2. Installing and configuring pmda-openmetrics

You must install and configure pmda-openmetrics before you start using it. The following example demonstrates how to expose a single numeric value from a text file as a PCP metric by using pmda-openmetrics.

Prerequisites

Procedure

  1. Install the pmda-openmetrics PMDA.

    # dnf -y install pcp-pmda-openmetrics
    # cd /var/lib/pcp/pmdas/openmetrics/
    # ./Install
  2. Create a sample OpenMetrics file.

    # echo 'var1 {var2="var3"} 42' > /tmp/example.txt

    Replace example.txt with the desired file name.

  3. Verify that the file is created correctly.

    # cat /tmp/example.txt
  4. Register the metric file path with the OpenMetrics agent.

    # echo "file:///tmp/example.txt" > /etc/pcp/openmetrics/example.url
  5. Verify that the configuration is created correctly.

    # cat /etc/pcp/openmetrics/example.url
  6. Configure systemd-tmpfiles to create the necessary symlinks.

    # echo 'L+ /var/lib/pcp/pmdas/openmetrics/config.d/example.url - - - - ../../../../../../etc/pcp/openmetrics/example.url' \ > /usr/lib/tmpfiles.d/pcp-pmda-openmetrics-cust.conf
  7. Verify that the symlinks are configured correctly.

    # cat /usr/lib/tmpfiles.d/pcp-pmda-openmetrics-cust.conf
  8. Create the symlinks by applying the tmpfiles configuration.

    # systemd-tmpfiles --create --remove /usr/lib/tmpfiles.d/pcp-pmda-openmetrics-cust.conf
  9. Verify that the symlinks are created correctly.

    # ls -al /var/lib/pcp/pmdas/openmetrics/config.d/
  10. Verify that the metric is correctly reported.

    # pminfo -f openmetrics.example.var1
        inst [0 or "0 var2:var3"] value 42

Verification

  • Run pcp and confirm that openmetrics is listed.
  • Run systemd-analyze cat-config tmpfiles.d and confirm that example.url appears in the output.
  • Use pminfo to confirm the presence and value of the metric.
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben