Analyzing your cost data

Cost Management Service 1-latest

Use cost management to track the cost of your clouds and containers.

Red Hat Customer Content Services

Abstract

Learn about currency exchange, caluclating effective usage, and other ways to analyze your cost data.

Preface

After you have integrated cost management with your OpenShift clusters and cloud providers, use the data collected to analyze cloud and OpenShift cost data to accurately track and manage IT infrastructure spending.

Chapter 1. Use the cost management currency exchange

Use the cost management currency exchange feature to estimate your costs in your local currency. This feature updates costs both in This content is not included.Red Hat Hybrid Cloud Console and in your exported cost report files. Cost management uses the United States Dollar (USD) by default.

Cost management updates currency exchange information daily with the most recent data from Content from www.exchangerate-api.com is not included.ExchangeRate-API. The values in cost management do not reflect any foreign currency contract agreements.

Procedure

  1. From This content is not included.Red Hat Hybrid Cloud Console go to This content is not included.cost management.
  2. From the currency menu, select your local currency.

    After you change your currency, cost management automatically updates all values with the most recent exchange rates.

Additional resources

Chapter 2. Calculate effective usage with cost models

Use cost management to calculate the effective usage of cloud infrastructure, to more accurately correlate cloud costs with a pod or namespace by considering their direct use. Note that cloud providers charge for the infrastructure costs of running a cluster, regardless of your overall usage.

A pod typically requests resources, such as CPU or memory, from a cluster. The cluster then reserves these requested resources as a minimum, but the pod might use more or less than it initially requested. The effective usage metric in cost management uses whichever kind of usage, CPU or memory, is greater per hour.

You can create a cost model in cost management to estimate your effective usage. Ultimately, you can use this data to understand how infrastructure cost is distributed to your OpenShift project.

Prerequisites

Procedure

  1. Log in to This content is not included.Red Hat Hybrid Cloud Console.
  2. From the Services menu, click Spend ManagementCost Management.
  3. In the Global Navigation, click Cost ManagementSettings.
  4. In the Cost Models tab, click Create cost model to open the cost model wizard.
  5. Enter a name and description for the cost model and select OpenShift Container Platform as the integration type. Click Next.
  6. Create a price list so that you can assign rates to usage or requests. The cost management service collects these metrics from OpenShift but there is no cost attached to them in cost management until you apply a cost model.

    1. To create a price list to calculate effective CPU usage, click Create rate.

      1. Add a description. In this example, enter effective cpu usage.
      2. In the Metric field, select CPU.
      3. In the Measurement field, select Effective-usage (core-hours).
      4. In the Rate field, enter the rate you pay for CPU usage. In this example, enter 2. Click Create rate.
    2. To create a price list to calculate effective memory usage, click Create rate.

      1. Add a description. In this example, enter effective memory usage.
      2. In the Metric field, select Memory.
      3. In the Measurement field, select Effective-usage (GiB-hours).
      4. In the Rate field, enter the rate you pay for memory usage. In this example, enter 1. Click Create rate.
  7. Click Next.
  8. (Optional) On the Cost calculations page, apply a markup or discount to change how raw costs are calculated for your integrations. Adding a markup to your raw costs can allow you to account for your overhead costs, such as the cost of administering your AWS account, Azure subscription, or other support costs. A markup is an estimation to cover your costs not shown by metrics or usage.
  9. On the Cost distribution page, select the CPU or Memory distribution type. The distribution type distributes costs based on CPU or memory metrics in project cost breakdowns. If your cluster has high memory usage, select Memory. If your cluster has high CPU usage, select CPU. Click Next.
  10. Assign an integration to your cost model and then click Next.
  11. Review the details and then click Create.
  12. To review the results of your cost model on a integration, in the Global Navigation, click Cost ManagementOpenShift.
  13. Select a project and view the results.

Chapter 3. Get information about your clusters and data

In the Cluster information page of cost management, you can view information such as the status of your integration, the time of data retrieval, and links to each integration. You can also pause and resume integrations.

Procedure

  1. Review information about your cluster:

    1. Navigate to cost management > OpenShift.
    2. In the Group by drop-down, select Cluster.
    3. Select the cluster that you want to view. An OpenShift cluster details page opens.
    4. At the top of the page, click the hyperlink Cluster information.

      The Cluster information page provides the following details:

      • Cluster ID
      • The cost management operator version and if any updates are available
      • The Red Hat integration (the integration for your cluster)
      • Your Cloud integration

        If you are running a cluster on-premise or if you did not add a cloud integration for your cluster, you won’t see a value in Cloud integration.

  2. Review information about your data:

    1. Navigate to cost management > OpenShift.
    2. In the Group by drop-down, select Cluster.
    3. Select the cluster that you want to view. An OpenShift cluster details page opens.
    4. At the top of the page, click the hyperlink Data details.

      There are three sections that give you details about your cloud data, cluster data, and about cost management data:

      • Cloud integration status or Red Hat integration status

        • Provides a link to your integrations.
      • Data availability

        • For Cloud data, a timestamp refers to the last time that cost management checked for an available report.
      • Data retrieval

        • For Cloud data, a timestamp refers to when cost management retrieved your data from the cloud provider.
        • For Cluster data, a timestamp refers to when cost management retrieved your data from the ingress service that the operator uploads it to.
      • Data processing

        • This timestamp refers to when cost management unpacked the reports, put them in the database, and made them available with the API.
      • Data integration and finalization

        • For cost management data, a timestamp refers to when cost management correlated the raw billing data from your cloud with your cluster metrics, and then applied any cost model rates against your metrics.
  3. Pause or resume an integration:

    1. In the Integrations section of console.redhat.com Settings, choose an integration that you want to pause or resume.
    2. On the row of the integration that you want to pause or resume, click the more options menu more options .
    3. Verify that Cloud integration status has either a pause icon or a green checkmark. It can take a couple seconds for it to load.

Chapter 4. Verify the status of cost data uploads

Verify the cost data upload status for each of your cost model integrations and view the date and time that the data was last updated so that you can accurately track cost estimates.

Prerequisites

  • You are a user with either the Cost Administrator role or the Cost Cloud Viewer or Cost OpenShift Viewer role, depending whether you want to verify data on OpenShift or cloud integrations. See Limiting access to cost management resources for information about configuring user roles.

Procedure

  1. Log in to the This content is not included.Red Hat Hybrid Cloud Console.
  2. Navigate to one of the following cost management pages:

  3. To view the Integrations status page, click View all next to Integrations status. A list of your integrations with the status of the cost data and the last time and date that the data was updated is displayed.
  4. Click Data details next to any integration. The Integrations details window opens. This window provides a breakdown of the overall cost data status into different components.
  5. Review the time and date stamps.
  6. If any component has a paused or incomplete status, or a complete status but has a time stamp that is over two weeks old, open a Red Hat support case at This content is not included.Help > Open a support case.

Chapter 5. Configure cost management notifications

Configure notifications for your organization from the Notifications menu on the This content is not included.Red Hat Hybrid Cloud Console This content is not included.Settings page. The This content is not included.Red Hat Hybrid Cloud Console notifications service can automatically alert you to potential issues with cost management.

Prerequisite

  • You are logged in to the Red Hat Hybrid Cloud Console as a user with the Notifications admistrator role.

Procedure

  1. To configure a notification integration, go to Configuring notifications and integrations on the Red Hat Hybrid Cloud Console.
  2. After you configure the notification type, select the type of event you want This content is not included.Red Hat Hybrid Cloud Console to notify you about. For cost management, you can create the following types of notification events:

    Availability status
    Your cloud integration stopped sending data. Check that your integration is configure correctly. Refer to the cost management integration documentation for your cloud provider.
    Missing OpenShift Container Platform Cost Model
    You did not configure a cost model for an OpenShift Container Platform integration. You must configure a cost model for your OpenShift Container Platform integrations to accurately calculate your organization’s costs.
    CM Operator Stale Data
    The data received from the Cost Management Metrics Operator is stale. Cost management uses this data to calculate costs for your integrations. When this data is stale, the cost management service does not calculate your organization’s most recent costs.

Chapter 6. View costs associated with virtual machines

View costs that are directly associated with virtual machines (VMs) running on your OpenShift clusters. Cost management provides support for tracking Red Hat OpenShift Virtualization.

Cost management gathers information about each VM that is running on OpenShift and associates costs to it at a monthly aggregate level. The API endpoint is /api/cost-management/v1/reports/openshift/resources/virtual-machines/.

Procedure

  1. In cost management, navigate to a specific cluster, node, or project.
  2. Click the Virtualization tab on the OpenShift details page.

Legal Notice

Copyright © Red Hat.
Except as otherwise noted below, the text of and illustrations in this documentation are licensed by Red Hat under the Creative Commons Attribution–Share Alike 3.0 Unported license . If you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, the Red Hat logo, JBoss, Hibernate, and RHCE are trademarks or registered trademarks of Red Hat, LLC. or its subsidiaries in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS is a trademark or registered trademark of Hewlett Packard Enterprise Development LP or its subsidiaries in the United States and other countries.
The OpenStack® Word Mark and OpenStack logo are trademarks or registered trademarks of the Linux Foundation, used under license.
All other trademarks are the property of their respective owners.