IBM Cloud Pak foundational services 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 one month. Monthly summary reports are also available for you to download and are kept for up to 24 months.
The metering service is only installed if a user installs IBM Cloud Pak foundational services by running the cs-install
command.
- Viewing metering reports
- Using the metering service to manage chargebacks
- Tracking usage of IBM products that are running outside of your product cluster
Viewing metering reports
- From your product console, open the navigation menu and click Administer > Metering.
-
View and download metering data.
-
To view metering data for Cloud Paks, click Cloud Paks and navigate to the wanted Cloud Pak. Data is segmented by each application within the Cloud Pak.
- You can view metrics for Available processors, Capped processors, Memory, and Processor usage.
- 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 view metering data for applications, click Workloads and navigate to the wanted application.
- You can view metrics for Available processors, Capped processors, Processor usage, and Memory usage.
- 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 view metering data for storage, click Storage and navigate to the wanted persistent volume claim (PVC).
- You can view the storage metric to see the amount of storage allocated for this PVC.
- You can update the displayed time range to show a period of interest.
- You can download the displayed storage data as a
.csv
file. - PVCs are grouped by namespace. The
Storage
group indicates the amount of storage that is used by the cluster across all namespaces.
- 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, namespace, and IBM Cloud Pak® levels, and is easiest to use for chargebacks.
- The Full Report contains a detailed summary of usage data for products, namespaces, and each container instance. Use the full report 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.
-
-
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 isFINAL
orPENDING
. The most recent month is marked asPENDING
. More metering data might still be processed and these report sections updated. When a section is markedFINAL
, it is no longer being 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 your product, can include extra metrics beyond the default Available processors (Acores), Capped processors (Ccores), Processor usage (Ucores), and Memory usage (Memory) 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.
To download the metering reports from the command line instead of from the UI, use the metering
command that is part of your product cloudctl (CLI). For more information, see Metering commands).
Using the metering service to manage chargebacks
You can track your product 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 users 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 {site.data.keyword.product}} 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:
- An
https
endpoint to which data is sent. - An API key for authentication.
To create the API key, complete the following steps:
-
Create a
serviceid
that binds to the namespace that your product user has access to. For example:cloudctl login -a https://<icp-cluster-ip>:8443 -n default --skip-ssl-validation cloudctl iam service-id-create my-serviceid-for-metering -d "Metering access serviceid in the default namespace"
-
Create a service
policy
, that grants theserviceid
either operator or a higher role access to themetering-service
. For example:cloudctl iam service-policy-create my-serviceid-for-metering -r Operator --service-name metering-service
-
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 service IDs, service policies, and API keys from cloudctl, see cloudctl iam commands.
Users with Cluster Administrator or Administrator roles can view any API key that binds to the namespace to which these roles have access to.
- From your product console, open the navigation menu and click Administer > Metering.
- From the metering dashboard, select Manage API Keys from the menu next to the Download Report button. 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 your product. Review the external product documentation for information about how to configure communication by using API keys.
External products that send data to your product 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.