Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 4. Metrics data retention

download PDF

The storage capacity required by PCP data logging is determined by the following factors:

  • The logged metrics
  • The logging interval
  • The retention policy

The default logging (sampling) interval is 60 seconds. The default retention policy is to compress archives older than one day and to keep archives for the last 14 days.

You can increase the logging interval or shorten the retention policy to save storage space. If you require high-resolution sampling, you can decrease the logging interval. In such case, ensure that you have enough storage space.

PCP archive logs are stored in the /var/log/pcp/pmlogger/satellite.example.com directory.

4.1. Changing default logging interval

You can change the default logging interval to either increase or decrease the sampling rate, at which the PCP metrics are logged. A larger interval results in a lower sampling rate.

Procedure

  1. Open the /etc/pcp/pmlogger/control.d/local configuration file.
  2. Locate the LOCALHOSTNAME line.
  3. Append -t XXs, where XX is the required time interval in seconds.
  4. Save the file.
  5. Restart the pmlogger service:

    # systemctl restart pmlogger

4.2. Changing data retention policy

You can change the data retention policy to control after how long the PCP data are archived and deleted.

Procedure

  1. Open the /etc/sysconfig/pmlogger_timers file.
  2. Locate the PMLOGGER_DAILY_PARAMS line.
  3. If the line is commented, uncomment the line.
  4. Configure the following parameters:

    • Ensure the default -E parameter is present.
    • Append the -x parameter and add a value for the required number of days after which data is archived.
    • Append the -k parameter and add a value for the number of days after which data is deleted.

    For example, the parameters -x 4 -k 7 specify that data will be compressed after 4 days and deleted after 7 days.

  5. Save the file.

4.3. Viewing data storage statistics

You can list all available metrics, grouped by the frequency at which they are logged. For each group, you can also view the storage required to store the listed metrics, per day.

Example storage statistics:

logged every 60 sec: 61752 bytes or 84.80 Mbytes/day

Procedure

  • To view data storage statistics, enter the following command on your Satellite Server:

    # less /var/log/pcp/pmlogger/satellite.example.com/pmlogger.log
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.