이 콘텐츠는 선택한 언어로 제공되지 않습니다.
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/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:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable and start the Performance Metrics Collector daemon and Performance Metrics Logger daemon:
systemctl enable --now pmcd pmlogger
# systemctl enable --now pmcd pmloggerCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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:
ln -s /etc/pcp/proc/foreman-hotproc.conf /var/lib/pcp/pmdas/proc/hotproc.conf
# ln -s /etc/pcp/proc/foreman-hotproc.conf /var/lib/pcp/pmdas/proc/hotproc.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow 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:
cd /var/lib/pcp/pmdas/proc ./Install
# cd /var/lib/pcp/pmdas/proc # ./InstallCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure PCP to collect metrics from Apache HTTP Server.
Enable the Apache HTTP Server extended status module:
satellite-installer --enable-apache-mod-status
# satellite-installer --enable-apache-mod-statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the Apache HTTP Server PMDA:
cd /var/lib/pcp/pmdas/apache ./Install
# cd /var/lib/pcp/pmdas/apache # ./InstallCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Configure PCP to collect metrics from PostgreSQL:
cd /var/lib/pcp/pmdas/postgresql ./Install
# cd /var/lib/pcp/pmdas/postgresql # ./InstallCopy to Clipboard Copied! Toggle word wrap Toggle overflow Enable the telemetry feature in Satellite:
satellite-installer --foreman-telemetry-prometheus-enabled true
# satellite-installer --foreman-telemetry-prometheus-enabled trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure PCP to collect data from Satellite:
cd /var/lib/pcp/pmdas/openmetrics echo "https://satellite.example.com/metrics" > config.d/foreman.url ./Install
# cd /var/lib/pcp/pmdas/openmetrics # echo "https://satellite.example.com/metrics" > config.d/foreman.url # ./InstallCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart PCP to begin data collection:
systemctl restart pmcd pmlogger pmproxy
# systemctl restart pmcd pmlogger pmproxyCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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
# pcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output of the
pcpcommand:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
pmloggeris 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:
satellite-maintain packages install grafana grafana-pcp
# satellite-maintain packages install grafana grafana-pcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start and enable the Grafana web service and the PCP proxy service:
systemctl enable --now pmproxy grafana-server
# systemctl enable --now pmproxy grafana-serverCopy to Clipboard Copied! Toggle word wrap Toggle overflow Open the firewall port to allow access to the Grafana web interface:
firewall-cmd --permanent --add-service=grafana
# firewall-cmd --permanent --add-service=grafanaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the firewall configuration to apply the changes:
firewall-cmd --reload
# firewall-cmd --reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 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.