Skip to content
DocsOpenAPI spec

    List VM Metric Descriptors

    GET/v1/compute/metric_descriptors

    Describe every metric a VM reports: its name, unit, the range its values fall in, and whether a value can be null. Read this instead of holding a list of metric names, so a metric published later is picked up without a client change.

    ReturnsExpand Collapse
    VMMetricDescriptorList object { items, pagination }
    items: array of VMMetricDescriptor { description, max_value, metric, 3 more }
    description: string

    What the metric measures.

    max_value: number

    Highest value the metric reports, or null when it has no ceiling of its own.

    metric: string

    Fully-qualified name of the metric, and the only spelling the metric query parameter accepts.

    min_value: number

    Lowest value the metric reports.

    nullable: boolean

    Whether a point’s value can be null. A null means the VM reported no observation for that period, which is what a stopped VM looks like.

    Unit the values are expressed in.

    One of the following:
    "ratio"
    "bytes"
    "cores"
    "bytes_per_second"
    "operations_per_second"

    List VM Metric Descriptors

    curl https://api.nirvanalabs.io/v1/compute/metric_descriptors \
        -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
    {
      "items": [
        {
          "description": "Consumed CPU over the vCPU allocated to the VM.",
          "max_value": 1,
          "metric": "compute.nirvanalabs.io/vm/cpu/utilization",
          "min_value": 0,
          "nullable": true,
          "unit": "ratio"
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }
    Returns Examples
    {
      "items": [
        {
          "description": "Consumed CPU over the vCPU allocated to the VM.",
          "max_value": 1,
          "metric": "compute.nirvanalabs.io/vm/cpu/utilization",
          "min_value": 0,
          "nullable": true,
          "unit": "ratio"
        }
      ],
      "pagination": {
        "next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
        "previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
        "total_count": 125
      }
    }