Configuring summarization

Summarization is the process of aggregating retained data into time-based categories: hourly and daily. When the metric summary service is enabled, metric samples are summarized and kept on the Cloud App Management server. You can change how often the hourly metrics are summarized, how long hourly and daily summarized metrics are kept on the server, and turn off daily summarization.

Before you begin

The metric summary service is disabled by default. If you have not enabled summarization, you must run server installation to enable it as described in step 14 of Installing your Cloud App Management server or step 8 of Upgrading your server.

About this task

Use this procedure if you want change any of these default settings by creating a Kubernetes ConfigMap with the variables that you want to change:
SHORT_TERM_SUMMARY_TTL: "P60D"
The hourly summarized metrics for short-term history are kept on the Cloud App Management server for 60 days by default. Best practice is to set the value from 8 days to 60 days.
LONG_TERM_SUMMARY_TTL: "P6M"
The daily summarized metrics for long-term history are kept on the Cloud App Management server for 6 months by default. Best practice is to set the value from 2 months to 13 months.
POLICY_GENERATION_HOURLY_INTERVAL: "PT1H"
The metric samples that were taken (typically once per minute) for the past hour are summarized. Change to a different interval, up to 24 hours.
DAILY_SUMMARIZATION_ENABLED: "true"
The metric samples that were taken (typically once per minute) for the past day are summarized once per day and saved for long-term history. Creation of the long-term history can take several hours to complete. If you don't want to keep long-term historical data, use this variable to turn off daily summarization. When this variable is used, the LONG_TERM_SUMMARY_TTL variable is not used.
When determining the values to set, take into account the considerations in Data retention and summarization.

Procedure

Take these steps to configure data summarization:

  1. Create the Kubernetes ConfigMap with the following variables, using the ISO 8601 duration format, and save as a YAML file:
    
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: releaseName-metricsummarypolicy-config
      labels:
        release: releaseName
    data:
      SHORT_TERM_SUMMARY_TTL: "P60D"
      LONG_TERM_SUMMARY_TTL: "P6M"  
      POLICY_GENERATION_HOURLY_INTERVAL: "PT1H"
      DAILY_SUMMARIZATION_ENABLED: "true"
    
    where
    • releaseName is the release name, such as ibmcloudappmgmt.
    • 60 is the number of days to keep the hourly summarized metrics for short-term history. Best practice is to set the value from 8 days (P8D) to 60 days (P60D).
    • 6 is the number of months to keep the daily summarized metrics for long-term history. Best practice is to set the value from 2 months (P2M) to 13 months (P13M).
    • 1 is the frequency of hourly summarization. Use this variable to run hourly summarization at a different interval, up to 24 hours (PT24H). For example, set POLICY_GENERATION_HOURLY_INTERVAL: PT3H to summarize the past 3 hours of metric samples.
    • true specifies to perform daily summarization for long-term history, which is set to true by default. Set to false to disable daily summarization, which also disables the LONG_TERM_SUMMARY_TTL variable and causes only hourly summarization to occur.
  2. Create the ConfigMap in your Kubernetes environment:
    
    kubectl create -f ConfigMap_path
    where ConfigMap_path is the path where you want to save the ConfigMap.
  3. Scale the summary policy service down:
    kubectl scale deployment deployment_name --replicas=0 -n "namespace"
    
    where
    • deployment_name is the name of the deployment of the metric summary policy service. You can find the name by issuing the following command:
      kubectl get deployments -n namespace | grep metricsummarypolicy
    • namespace is the name of the namespace that was used when you installed Cloud App Management (such as ops-am)
  4. Scale the summary policy service up:
    kubectl scale deployment deployment_name --replicas=1 -n "namespace"