Chapter 3. Setting up the metrics monitoring solution 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 Install the PCP packages: Enable and start the Performance Metrics Collector daemon and Performance Metrics Logger daemon: 3.2. Configuring PCP data collection You can configure PCP to collect metrics about processes, Satellite, Apache HTTP Server, and PostgreSQL. Procedure Symlink the Satellite specific configuration to PMDA process monitoring: By default, PCP only collects basic system metrics. This step enables detailed metrics about the following Satellite processes: Java PostgreSQL Redis Dynflow Puma Pulpcore Install the process monitoring PMDA: Configure PCP to collect metrics from Apache HTTP Server. Enable the Apache HTTP Server extended status module: Enable the Apache HTTP Server PMDA: Configure PCP to collect metrics from PostgreSQL: Enable the telemetry feature in Satellite: Configure PCP to collect data from Satellite: Restart PCP to begin data collection: 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: Example output of the pcp command: 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 Install Grafana and the Grafana PCP plugin on your Satellite Server: Start and enable the Grafana web service and the PCP proxy service: Open the firewall port to allow access to the Grafana web interface: Reload the firewall configuration to apply the changes: 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 . 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 .

Commands:
satellite-maintain packages install pcp pcp-pmda-apache pcp-pmda-openmetrics pcp-pmda-postgresql pcp-pmda-redis pcp-system-tools foreman-pcp
systemctl enable --now pmcd pmlogger
ln -s /etc/pcp/proc/foreman-hotproc.conf /var/lib/pcp/pmdas/proc/hotproc.conf
cd /var/lib/pcp/pmdas/proc ./Install
satellite-installer --enable-apache-mod-status
cd /var/lib/pcp/pmdas/apache ./Install
cd /var/lib/pcp/pmdas/postgresql ./Install
satellite-installer --foreman-telemetry-prometheus-enabled true
cd /var/lib/pcp/pmdas/openmetrics echo "https:// satellite.example.com /metrics" > config.d/foreman.url ./Install
systemctl restart pmcd pmlogger pmproxy
pcp
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
satellite-maintain packages install grafana grafana-pcp
systemctl enable --now pmproxy grafana-server
firewall-cmd --permanent --add-service=grafana
firewall-cmd --reload