IBM Cloud Docs
Monitoring metrics for Container Registry

Monitoring metrics for Container Registry

You can use IBM Cloud® Monitoring to monitor platform metrics of IBM Cloud® Container Registry usage for your account and to create alerts based on these metrics.

Platform metrics for Container Registry must be enabled in each Container Registry region that you want to monitor, see Enabling metrics for Container Registry. For more information about IBM Cloud Monitoring, see Monitoring in IBM Cloud.

Enabling metrics for Container Registry

You must enable Container Registry metrics in each region that you want to see metrics.

You can create a Monitoring instance in the region that you want to monitor and enable platform metrics for it. Alternatively, you can enable platform metrics on an existing Monitoring instance in that region.

Complete the following steps to create and configure platform metrics for Container Registry.

  1. Create and configure an IBM Cloud Monitoring instance that is configured with platform metrics in the region that you want to monitor, see Getting started with IBM Cloud Monitoring.

    For more information about the locations where Container Registry is enabled for monitoring, see Locations of platform metrics.

  2. Log in to IBM Cloud.

    ibmcloud login
    
  3. Target the region where you want to enable metrics by running the ibmcloud cr region-set command. Replace <region> with the name of the region.

    ibmcloud cr region-set <region>
    
  4. Check whether metrics are already enabled for your account by running the following ibmcloud cr platform-metrics command. This command also displays the registry that the result applies to.

    ibmcloud cr platform-metrics --status
    
  5. Enable platform metrics by running the following ibmcloud cr platform-metrics command. It can take up to 30 minutes for your metrics to become effective.

    ibmcloud cr platform-metrics --enable
    

    If you want to target a different region, run the ibmcloud cr region-set command.

Locations of platform metrics

You can configure one monitoring instance in each region to collect platform metrics for IBM Cloud Container Registry. The following tables list the locations where metrics can be collected if you enable collection of Container Registry service metrics in that region.

Table 1. The automatic collection of Container Registry service metrics in Americas locations
Locations in Americas Platform metrics available
Dallas (us-south) Yes
Sao Paulo (br-sao) Yes
Toronto (ca-tor) Yes
Table 2. The automatic collection of Container Registry service metrics in Asia Pacific locations
Locations in Asia Pacific Platform metrics available
Osaka (jp-osa) Yes
Sydney (au-syd) Yes
Tokyo (jp-tok) Yes
Table 3. The automatic collection of Container Registry service metrics in Europe locations
Locations in Europe Platform metrics available
Frankfurt (eu-de) Yes
London (eu-gb) Yes
Madrid (eu-es) Yes
Table 4. The automatic collection of Container Registry service metrics for Global
Location for Global Platform metrics available
Global Yes

For more information about where to see Container Registry metrics, see Where to look for metrics.

For more information about the locations where IBM Cloud services are enabled to send metrics to IBM Cloud Monitoring, see IBM Cloud services by location.

Where to look for metrics

Monitoring metrics

The region in which a Container Registry or a Vulnerability Advisor metric is available corresponds to the region of the Container Registry that generated the metric.

The following table shows the location of Monitoring metrics.

Table 5. Location of Monitoring metrics
Region for your account's registry Domain name of your registry Location of Monitoring metrics
ap-north jp.icr.io Tokyo (jp-tok)
ap-south au.icr.io Sydney (au-syd)
br-sao br.icr.io Sao Paulo (br-sao)
ca-tor ca.icr.io Toronto (ca-tor)
eu-central de.icr.io Frankfurt (eu-de)
eu-es es.icr.io Madrid (eu-es)
jp-osa jp2.icr.io Osaka (jp-osa)
uk-south uk.icr.io London (eu-gb)
us-south us.icr.io Dallas (us-south)

The following table shows the location of global registry Monitoring metrics.

Table 6. Location of global registry Monitoring metrics
Registry Global registry Location of IBM Cloud Activity Tracker metrics
Global icr.io Washington (us-east)

Viewing metrics

To monitor Container Registry metrics, you must start the Monitoring UI instance that is enabled for platform metrics in the region where you are using Container Registry.

Starting the Monitoring UI from the Observability page

To start the Monitoring UI from the Observability page, complete the following steps:

  1. Start the Monitoring UI.
  2. Select DASHBOARDS.
  3. In the Default Dashboards section, expand IBM.
  4. Choose the Container Registry dashboard from the list. Available dashboards are Container Registry Usage and Container Registry Quota Usage. For more information about predefined dashboards, see Predefined dashboards.

Next, change the scope or make a copy of the Default dashboard so that you can monitor your account in Container Registry. For more information, see Working with dashboards.

Predefined dashboards

The following table outlines the predefined monitoring dashboards that you can use to monitor Container Registry metrics.

Table 7. Predefined dashboards
Dashboard name Description Default dashboard
Container Registry Usage A dashboard that you can use to visualize the traffic usage and storage usage. Traffic usage is the sum of bytes from image pulls from your Container Registry namespaces in the current billing period. Storage usage is the sum of bytes of images in your Container Registry namespaces. Yes
Container Registry Quota Usage A dashboard that you can use to visualize the traffic usage and storage usage and compare the data to your quotas, if set. Visible only to those accounts that have finite quotas. The Container Registry Quota Usage dashboard is available only if you enable metrics and you have both a storage and a traffic quota set. No

The predefined dashboards can't be changed. You can copy any predefined dashboard so that you can change it to suit your requirements. For more information, see Working with dashboards.

When you start your dashboard, some metrics might display a Data Load Error warning icon. This warning is because more time is required to create the data. When data is available, the warning sign goes away, and the metric is populated. You might also need to change the resolution period.

Platform metrics

Table 8. Metrics available by plan names
Metric Name Information
Pull Traffic The account's pull traffic in the current month.
Pull Traffic Quota The account's pull traffic quota.
Storage Quota The account's storage quota.
Storage The account's storage usage.

Pull Traffic

The account's pull traffic in the current month.

Table 9. Pull Traffic metric metadata
Metadata Description
Metric Name ibm_containerregistry_pull_traffic
Metric Type gauge
Value Type byte

Pull Traffic Quota

The account's pull traffic quota.

Table 10. Pull Traffic Quota metric metadata
Metadata Description
Metric Name ibm_containerregistry_pull_traffic_quota
Metric Type gauge
Value Type byte

Storage Quota

The account's storage quota.

Table 11. Storage Quota metric metadata
Metadata Description
Metric Name ibm_containerregistry_storage_quota
Metric Type gauge
Value Type byte

Storage

The account's storage usage.

Table 12. Storage metric metadata
Metadata Description
Metric Name ibm_containerregistry_storage
Metric Type gauge
Value Type byte