Troubleshoot issues with the Cost Management Metrics Operator

If the Cost Management Metrics Operator is not working as expected, verify the content of the Cost Management Metrics Operator and check the memory allocation for the OpenShift cluster.

Verify the Cost Management Metrics Operator YAML configuration

Verify that your Cost Management Metrics Operator YAML file is configured correctly to ensure proper operation and data collection.

Before you begin

Procedure

  1. Click the Installed Operators tab.
  2. In the list of installed operators, click Cost Management Metrics Operator.A metrics operator window opens.
  3. Click the CostManagementMetricsConfig tab to show a list of the configuration file names.
  4. In the file name list, click the configuration file that you want to verify. In the default installation, the file name is costmanagementmetricscfg-sample. A Details window opens.
  5. Click YAML and check the following items:
    • prometheus_configured and prometheus_connected should be set to true:
        prometheus:
          last_query_start_time: '2021-01-25T20:59:06Z'
          last_query_success_time: '2021-01-25T20:59:06Z'
          prometheus_configured: true
          prometheus_connected: true
          service_address: 'https://thanos-querier.openshift-monitoring.svc:9091'
          skip_tls_verification: false
    • ingress_path, last_successful_upload_time, last_upload_status, and last_upload_time should all have content:
       upload:
          ingress_path: /api/ingress/v1/upload
          last_successful_upload_time: '2021-01-25T20:59:35Z'
          last_upload_status: 202 Accepted
          last_upload_time: '2021-01-25T20:59:35Z'
          upload: true
          upload_cycle: 360
          upload_wait: 28
          validate_cert: true

Adjust pod memory size

Increase pod memory allocation to prevent out-of-memory errors on large OpenShift deployments during initial data ingestion.

Before you begin

  • The Cost Management Metrics Operator is installed.
  • You have cluster administrator privileges.

Procedure

Increase the pod memory to 2GiB or more for the initial data ingestion.

After the initial data ingestion completes, pod memory can be reduced. The exact memory requirements for the pod vary based on the size of the OpenShift cluster.