Search

Chapter 3. Setting up the metrics monitoring solution

download PDF

Install PCP packages and configure PCP data collection. You can use the PCP CLI tools to retrieve metrics in the command line. Optionally, you can install Grafana to enable web UI access to metrics.

3.1. Installing PCP

Install the PCP packages on your Satellite Server and enable PCP daemons.

Prerequisites

  • Ensure you have the minimum of 20 GB space available in the /var/log/pcp directory.

    With the default PCP data retention settings, data storage is estimated to use between 100 MB and 500 MB of disk space per day, but may use up to several gigabytes over time. For more information, see Chapter 4, Metrics data retention.

Procedure

  1. Install the PCP packages:

    # satellite-maintain packages install pcp \
    pcp-pmda-apache \
    pcp-pmda-openmetrics \
    pcp-pmda-postgresql \
    pcp-pmda-redis \
    pcp-system-tools \
    foreman-pcp
  2. Enable and start the Performance Metrics Collector daemon and Performance Metrics Logger daemon:

    # systemctl enable --now pmcd pmlogger

3.2. Configuring PCP data collection

You can configure PCP to collect metrics about processes, Satellite, Apache HTTP Server, and PostgreSQL.

Procedure

  1. Symlink the Satellite specific configuration to PMDA process monitoring:

    # ln -s /etc/pcp/proc/foreman-hotproc.conf /var/lib/pcp/pmdas/proc/hotproc.conf

    By default, PCP only collects basic system metrics. This step enables detailed metrics about the following Satellite processes:

    • Java
    • PostgreSQL
    • Redis
    • Dynflow
    • Puma
    • Pulpcore
  2. Install the process monitoring PMDA:

    # cd /var/lib/pcp/pmdas/proc
    # ./Install
  3. Configure PCP to collect metrics from Apache HTTP Server.

    1. Enable the Apache HTTP Server extended status module:

      # satellite-installer --enable-apache-mod-status
    2. Enable the Apache HTTP Server PMDA:

      # cd /var/lib/pcp/pmdas/apache
      # ./Install
  4. Configure PCP to collect metrics from PostgreSQL:

    # cd /var/lib/pcp/pmdas/postgresql
    # ./Install
  5. Enable the telemetry feature in Satellite:

    # satellite-installer --foreman-telemetry-prometheus-enabled true
  6. Configure PCP to collect data from Satellite:

    # cd /var/lib/pcp/pmdas/openmetrics
    # echo "https://satellite.example.com/metrics" > config.d/foreman.url
    # ./Install
  7. Restart PCP to begin data collection:

    # systemctl restart pmcd pmlogger

3.3. Verifying PCP configuration

You can verify that PCP is configured correctly and services are active.

Procedure

  • Print a summary of the active PCP configuration:

    # pcp

    Example output of the pcp command:

    Performance Co-Pilot configuration on satellite.example.com:
    
     platform: Linux satellite.example.com 4.18.0-372.32.1.el8_6.x86_64 #1 SMP Fri Oct 7 12:35:10 EDT 2022 x86_64
     hardware: 16 cpus, 2 disks, 1 node, 31895MB RAM
     timezone: UTC
     services: pmcd pmproxy
         pmcd: Version 5.3.7-17, 13 agents, 4 clients
         pmda: root pmcd proc pmproxy xfs redis linux apache mmv kvm
               postgresql jbd2 openmetrics
     pmlogger: primary logger: /var/log/pcp/pmlogger/satellite.example.com/20230831.00.10
         pmie: primary engine: /var/log/pcp/pmie/satellite.example.com/pmie.log

    In this example, both the Performance Metrics Collector Daemon (pmcd) and Performance Metrics Proxy Daemon (pmproxy) services are running. It also confirms the PMDA that are collecting metrics. Finally, it lists the active log file, in which pmlogger is currently storing metrics.

3.4. Enabling web UI access to metrics

You can enable web UI access to metrics collected by PCP by installing Grafana.

Procedure

  1. Install Grafana and the Grafana PCP plugin on your Satellite Server:

    # satellite-maintain packages install grafana grafana-pcp
  2. Start and enable the Grafana web service and the PCP proxy service:

    # systemctl enable --now pmproxy grafana-server
  3. Open the firewall port to allow access to the Grafana web interface:

    # firewall-cmd --permanent --add-service=grafana
  4. Reload the firewall configuration to apply the changes:

    # firewall-cmd --reload
  5. Install PCP Redis and configure Grafana to load it. For more information, see Configuring PCP Redis in Red Hat Enterprise Linux 8 Monitoring and managing system status and performance.
  6. Access the Grafana web UI, enable the PCP plugin, and add PCP Redis as a data source. For more information, see Accessing the Grafana web UI in Red Hat Enterprise Linux 8 Monitoring and managing system status and performance.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.