검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.