// removed jquery ui css and js

View Cloud Metrics for a Region

Details

API Details
Name

View Cloud Metrics for a Region

Description
MethodGET
URI

v1/capacity/regions/regionId/metrics

CloudCenter ReleaseIntroduced in CloudCenter 4.8.2.
Notes

General:

  • For additional context on <PORT> usage in the following example(s), see Base URI Format.

API:

  • The capacity management feature is only available for VMware and OpenStack clouds.
  • To use this API, you must use an admin account or a privileged account with roles to execute Capacity Management APIs on the cloud region. This account should have cloud provider privileges with the capability of handling APIs in the cloud. Choose an account that has the privilege to access the capacity of every cluster or zone in the cloud.
  • If you turn Capacity Management off after it has been configured, configuration settings are maintained but collections of utilization metrics are stopped. If you then turn Capacity Management back on, collections of utilization metrics start again. See the Enable/Disable Capacity Management section for the relevant release for additional context.

ESB Header

action: get.capacity.regions.regionId.metrics

See the Enterprise Service Bus (ESB) section for the relevant release for additional context.

Example 1 – Cloud Metrics for a Specific VMWare region

curl -k -X GET -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/capacity/regions/1/metrics"

Response

{
   "lastUpdatedTime":1519700976000,
   "lastErrorMessage":null,
   "metricsInfo":{
      "totalVms":191,
      "cpu":{
         "total":4800,
         "utilized":321,
         "utilizedPercentage":6
      },
      "memory":{
         "total":1434,
         "utilized":523,
         "utilizedPercentage":36
      },
      "totalResources":3
   },
   "placementResources":[
      {
         "id":null,
         "name":"dc1",
         "type":"DataCenter",
         "metricsInfo":{
            "totalVms":191,
            "cpu":{
               "total":4800,
               "utilized":321,
               "utilizedPercentage":6
            },
            "memory":{
               "total":1434,
               "utilized":523,
               "utilizedPercentage":36
            },
            "totalResources":3
         },
         "status":null,
         "availability":null,
         "defaultSettings":null,
         "actions":null,
         "childPlacementResources":[
            {
               "id":19,
               "name":"QA-Automation",
               "type":"Cluster",
               "metricsInfo":{
                  "totalVms":128,
                  "cpu":{
                     "total":2240,
                     "utilized":225,
                     "utilizedPercentage":10
                  },
                  "memory":{
                     "total":669,
                     "utilized":338,
                     "utilizedPercentage":50
                  },
                  "totalResources":0
               },
               "status":"Running",
               "availability":null,
               "defaultSettings":[

               ],
               "actions":[
                  "EditClusterSettings",
                  "Exclude"
               ],
               "childPlacementResources":[

               ]
            },
            {
               "id":40,
               "name":"Dev",
               "type":"Cluster",
               "metricsInfo":{
                  "totalVms":58,
                  "cpu":{
                     "total":2240,
                     "utilized":87,
                     "utilizedPercentage":3
                  },
                  "memory":{
                     "total":669,
                     "utilized":174,
                     "utilizedPercentage":25
                  },
                  "totalResources":0
               },
               "status":"Running",
               "availability":null,
               "defaultSettings":[

               ],
               "actions":[
                  "EditClusterSettings",
                  "Exclude"
               ],
               "childPlacementResources":[

               ]
            },
            {
               "id":18,
               "name":"Capacity",
               "type":"Cluster",
               "metricsInfo":{
                  "totalVms":5,
                  "cpu":{
                     "total":320,
                     "utilized":9,
                     "utilizedPercentage":2
                  },
                  "memory":{
                     "total":96,
                     "utilized":11,
                     "utilizedPercentage":11
                  },
                  "totalResources":0
               },
               "status":"Running",
               "availability":null,
               "defaultSettings":[

               ],
               "actions":[
                  "EditClusterSettings",
                  "Exclude"
               ],
               "childPlacementResources":[

               ]
            }
         ]
      }
   ],
   "cloudFamily":"VMware",
   "metricsInfoOld":false
}

Example 2 – Cloud Metrics for a Specific OpenStack region

curl -k -X GET -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/capacity/regions/55/metrics"

Response

{
    "lastUpdatedTime": 1513136635000,
    "lastErrorMessage": null,
    "metricsInfo": {
        "totalVms": 171,
        "cpu": {
            "total": 480,
            "utilized": 239,
            "utilizedPercentage": 49
        },
        "memory": {
            "total": 2518,
            "utilized": 696,
            "utilizedPercentage": 27
        },
        "totalResources": 2
    },
    "placementResources": [
        {
            "id": 4,
            "name": "zone1",
            "type": "Zone",
            "metricsInfo": {
                "totalVms": 18,
                "cpu": {
                    "total": 48,
                    "utilized": 19,
                    "utilizedPercentage": 39
                },
                "memory": {
                    "total": 252,
                    "utilized": 57,
                    "utilizedPercentage": 22
                },
                "totalResources": 0
            },
            "status": "Running",
            "availability": null,
            "defaultSettings": [],
            "actions": [
                "Exclude"
            ],
            "childPlacementResources": []
        },
        {
            "id": 3,
            "name": "nova",
            "type": "Zone",
            "metricsInfo": {
                "totalVms": 153,
                "cpu": {
                    "total": 432,
                    "utilized": 220,
                    "utilizedPercentage": 50
                },
                "memory": {
                    "total": 2266,
                    "utilized": 639,
                    "utilizedPercentage": 28
                },
                "totalResources": 0
            },
            "status": "Running",
            "availability": null,
            "defaultSettings": [],
            "actions": [
                "Exclude"
            ],
            "childPlacementResources": []
        }
    ],
    "cloudFamily": "Openstack",
    "metricsInfoOld": false
}

Request Attributes

regionId
  • DescriptionUnique, system-generated identifier for the cloud region 

  • Type: String

Required

Response Attributes

lastUpdatedTime
  • Description: Date that this resource was last updated. This attribute is the same as the lastUpdated attribute.

  • Type: Long

lastErrorMessage
  • Description: In case of any exception coming in collecting the metrics, this attribute lists the last error message to enable for further debugging.

  • Type: String

metricsInfo
  • Description: Identifies metrics for VMs (at the top level) or at the datacenter/zone or cluster level.

  • Type: Array of usage metrics

    totalVms
    • Description: Identifies the total number of defined VMs (overall at the top level) or at the datacenter/zone or cluster level.

    • Type: Integer

    cpu
    • Description: Identifies details for the Virtual CPUs (vCPUs).

    • Type: Array of usage metrics.

      total
      • Description: The total number of vCPUs or memory at the datacenter and zone/cluster level.

      • Type: Integer

      utilized
      • Description: The total number of utilized vCPUs or memory at the datacenter and zone/cluster level.

      • Type: Long

      utilizedPercentage
      • Description: The total percentage of utilized vCPUs or memory at the datacenter and zone/cluster level.

      • Type: Long

    memory
    • Description: Identifies details for memory at the cluster/zone level.

    • Type: Array of usage metrics.

      total
      • Description: The total number of vCPUs or memory at the datacenter and zone/cluster level.

      • Type: Integer

      utilized
      • Description: The total number of utilized vCPUs or memory at the datacenter and zone/cluster level.

      • Type: Long

      utilizedPercentage
      • Description: The total percentage of utilized vCPUs or memory at the datacenter and zone/cluster level.

      • Type: Long

    totalResources
    • Description: Identifies the number of child resources that are contained in each parent resource. For example, if a datacenter contains 2 clusters, then the resource at the datacenter level returns this number as 2.

    • Type: Integer

placementResources
  • Description: Identifies zone-related details for OpenStack environments and datacenter-related details for VMware environment. The Child Placement Resource displays cluster details within each datacenter.

  • Type: Array of usage metrics

    id
    • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

    • Type: String

    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    type
    • Description: Identifies the capacity management resource.

    • Type: Enumeration

      EnumerationDescription
      Zone
      DatacenterRefers to a VMware datacenter. See the VMware-Specific Configurations section for the relevant release for additional context.
      ClusterRefers to a either a group of VMware hosts. See the VMware-Specific Configurations section for the relevant release for additional context.

    metricsInfo
    • Description: Identifies metrics for VMs (at the top level) or at the datacenter/zone or cluster level.

    • Type: Array of usage metrics

      totalVms
      • Description: Identifies the total number of defined VMs (overall at the top level) or at the datacenter/zone or cluster level.

      • Type: Integer

      cpu
      • Description: Identifies details for the Virtual CPUs (vCPUs).

      • Type: Array of usage metrics.

        total
        • Description: The total number of vCPUs or memory at the datacenter and zone/cluster level.

        • Type: Integer

        utilized
        • Description: The total number of utilized vCPUs or memory at the datacenter and zone/cluster level.

        • Type: Long

        utilizedPercentage
        • Description: The total percentage of utilized vCPUs or memory at the datacenter and zone/cluster level.

        • Type: Long

      memory
      • Description: Identifies details for memory at the cluster/zone level.

      • Type: Array of usage metrics.

        total
        • Description: The total number of vCPUs or memory at the datacenter and zone/cluster level.

        • Type: Integer

        utilized
        • Description: The total number of utilized vCPUs or memory at the datacenter and zone/cluster level.

        • Type: Long

        utilizedPercentage
        • Description: The total percentage of utilized vCPUs or memory at the datacenter and zone/cluster level.

        • Type: Long

      totalResources
      • Description: Identifies the number of child resources that are contained in each parent resource. For example, if a datacenter contains 2 clusters, then the resource at the datacenter level returns this number as 2.

      • Type: Integer

    status
    • Description: Status of this resource 
    • Type: Enumeration

      EnumerationDescription
      RunningThe cloud account is operational
      StoppedThe cloud account is not operational
      MaintenanceModeThe cloud account is under maintenance

    availability
    • Description: Identifies if this cluster/zone is available for deployment. 

    • Type: Boolean

      • true = This cluster/zone is available for deployment.

      • false = Default. This cluster/zone is excluded by the CloudCenter platform for the configured duration or it is placed in maintenance mode by the cloud provider.

    defaultSettings
    • Description: The default settings for the deployment environment
    • Type: String

    actions
    • Description: Identifies the actions that permitted users can perform if the Capacity Management features is enabled. See the Specific Information on the Capacity Management Tab section for the relevant release for details.

    • Type: Enumeration

      API EnumerationUI Option
      Exclude
      Exclude from Deployment
      EditClusterSettings
      Edit Cluster Deployment Settings
      Include
      Include in Deployment
      CancelScheduledExclusion
      Cancel Scheduled Exclusion
      EditScheduledExclusion
      Edit Scheduled Exclusion

    childPlacementResources
    • Description: As a VMware datacenter can contain child resources, like clusters, all metrics when deploying a cluster are returned as part of this attribute. See placementResources for details.

    • Type: An array of placement details

cloudFamily                                                                                                                                                                                
  • Description: The cloud provider name.                     
  • Type: String

metricsInfoOld
  • Description: Identifies it the displayed metrics data is the latest information for the configured duration.

  • Type: Boolean

    • true = The metrics information is outdated as the latest information was not received from the system.

    • false = Default. This is the latest information received from the system.



  • No labels
© 2017-2019 Cisco Systems, Inc. All rights reserved