IBM Cloud Private metering service

You can use the metering service to view and download detailed usage metrics for your applications and cluster. Fine grained measurements are visible through the metering UI and the data is kept for up to three months. Monthly summary reports are also available for you to download and are kept for up to 24 months.

The metering service is automatically installed as part of the IBM Cloud Private environment.

Viewing metering reports

  1. From the IBM Cloud Private management console, open the navigation menu and click Platform > Metering.
  2. View and download metering data.
    • To view metering data for applications, click Workloads and navigate to the wanted application.
      • You can view metrics for Available Cores and Capped Cores.
      • You can update the displayed time range to show a period of interest.
      • You can download the displayed data for a specific application as a .csv file.
    • To download a .csv file that contains a monthly report of application metrics data, click Download Report and then select to download either the Workload Report or the Full Report.
      • The Workload Report contains a simplified summary of usage data at the product and namespace levels, and is easiest to use for chargebacks.
      • The Full Report contains a detailed summary of usage data for both the product and each container instance, and can be used for detailed auditing and analysis.
      • Your Virtual Processing Core (VPC) usage is the number of Ccores that is listed in the report.
    • To view metering data for nodes in your cluster, click Platform.
    • If Multi Cluster Management (MCM) is installed, the metering service on the MCM hub cluster includes more MCM metrics.
      • To view MCM data, select Managed Clusters.
      • To download a .csv file that contains a monthly summary of MCM data, click Download Report and select the MCM Report option.
      • The MCM Report shows the maximum number of nodes that are managed by MCM at any point in each month, and the maximum worker nodes for each managed cluster. The maximum for MCM might or might not match the sum of the nodes on each cluster. It depends on when, during the month, each cluster was added to or removed from MCM control. The cluster level maximums are included only to allow chargeback.
      • To view MCM data in the metering UI, or to be able to download the MCM report, you must have the Cluster Administrator role.
  3. Read the report .csv file.
    • The report is in CSV format, which can be loaded by any modern spreadsheet software. However, as CSV files do not include formatting details, it might be necessary to expand columns of interest to see all the data.
    • The report is organized into sections by month. The oldest tracked month appears at the beginning of the section and the newer months appear at the end of the section. The Period column displays the year and month of the section on each row.
    • The Status column displays whether the section is FINAL or PENDING. The two most recent months are marked as PENDING. More metering data might still be processed and these report sections updated. When a section is marked FINAL, it is no longer be updated.
    • Within each monthly section, the data is further separated into the following categories:
      • Overall summary
      • Summary by group (for example, namespace) and product
      • Summary for individual workloads.

Some workloads, especially workloads external to IBM Cloud Private, can include extra metrics beyond the default Available Cores (Acores) and Capped Cores (Ccores) automatically collected for containers by the metering service. In the Full Report download, these extra metrics are represented by two columns, the metric itself and an extra column titled breakdown. The breakdown column provides detailed technical information that can assist support staff or auditors, but does not normally need to be inspected.

Using the metering service to manage chargebacks

You can track IBM Cloud Private usage by a subset of the cluster users, such as teams, department, individuals, or specific clients. Use strategic namespace assignments to track the data. You can use the data that the metering service gathers about core usage to manage billing for the cluster users. This practice is commonly known as chargeback.

To use namespaces to manage chargebacks, you determine the subset of user that you want to track. Then, you create a namespace for each group of users, and assign each user access to only the namespace for the users' group. When you need to manage chargebacks for the groups, review the usage for each namespace. You can use the usage information for each namespace to assign billing for the group.

Tracking usage of IBM products that are running outside of your IBM Cloud Private cluster

If you want to send data from products that run outside of the IBM platform to the metering service, the following parameters must be configured:

To create the API key, complete the following steps:

  1. Create a serviceid that binds to the namespace that the IBM Cloud Private user has access to. For example:

    cloudctl login -n default --skip-ssl-validation
    cloudctl iam service-id-create my-serviceid-for-metering -d "Metering access serviceid in the default namespace"
    
  2. Create a service policy, that grants the serviceid either operator or a higher role access to the metering-service. For example:

    cloudctl iam service-policy-create my-serviceid-for-metering -r Operator --service-name metering-service
    
  3. Create an API key that binds to the serviceid. For example:

    cloudctl iam service-api-key-create my-apikey my-serviceid-for-metering
    

For more information about creating serviceids, service policies, and API keys from the CLI, see Creating a service ID by using IBM Cloud Private CLI.

Users with Cluster Administrator or Administrator roles can view any API key that binds to the namespace to which these roles have access to.

  1. From the IBM Cloud Private management console, open the navigation menu and click Platform > Metering.
  2. From the metering dashboard, select Manage API Keys. From this form, you can retrieve the API keys for your platform. You can also retrieve the metering API endpoint for products that are running outside of the platform.

If an IBM product is enabled for metering, you can set up communication between the product and IBM Cloud Private. Review the external product documentation for information about how to configure communication by using API keys.

External products that send data to the IBM Cloud Private metering service might provide product-specific metrics. These metrics are available from the metering dashboard and in the downloadable report. In some cases, the value in the report might be capped. In these cases, more details are provided in the report that explains how the value is determined. Review the external product documentation for details on the measurement approach for each metric.