Este conteúdo não está disponível no idioma selecionado.
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 Copiar o linkLink copiado para a área de transferência!
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/pcpdirectory.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:
# satellite-maintain packages install pcp \ pcp-pmda-apache \ pcp-pmda-openmetrics \ pcp-pmda-postgresql \ pcp-pmda-redis \ pcp-system-tools \ foreman-pcpEnable and start the Performance Metrics Collector daemon and Performance Metrics Logger daemon:
# systemctl enable --now pmcd pmlogger
3.2. Configuring PCP data collection Copiar o linkLink copiado para a área de transferência!
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:
# ln -s /etc/pcp/proc/foreman-hotproc.conf /var/lib/pcp/pmdas/proc/hotproc.confBy 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:
# cd /var/lib/pcp/pmdas/proc # ./InstallConfigure PCP to collect metrics from Apache HTTP Server.
Enable the Apache HTTP Server extended status module:
# satellite-installer --enable-apache-mod-statusEnable the Apache HTTP Server PMDA:
# cd /var/lib/pcp/pmdas/apache # ./Install
Configure PCP to collect metrics from PostgreSQL:
# cd /var/lib/pcp/pmdas/postgresql # ./InstallEnable the telemetry feature in Satellite:
# satellite-installer --foreman-telemetry-prometheus-enabled trueConfigure PCP to collect data from Satellite:
# cd /var/lib/pcp/pmdas/openmetrics # echo "https://satellite.example.com/metrics" > config.d/foreman.url # ./InstallRestart PCP to begin data collection:
# systemctl restart pmcd pmlogger pmproxy
3.3. Verifying PCP configuration Copiar o linkLink copiado para a área de transferência!
You can verify that PCP is configured correctly and services are active.
Procedure
Print a summary of the active PCP configuration:
# pcpExample output of the
pcpcommand: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.logIn 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
pmloggeris currently storing metrics.
3.4. Enabling web UI access to metrics Copiar o linkLink copiado para a área de transferência!
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:
# satellite-maintain packages install grafana grafana-pcpStart and enable the Grafana web service and the PCP proxy service:
# systemctl enable --now pmproxy grafana-serverOpen the firewall port to allow access to the Grafana web interface:
# firewall-cmd --permanent --add-service=grafanaReload the firewall configuration to apply the changes:
# firewall-cmd --reload- 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.