Skip to main content
A newer release of this product is available.

Retrieve counter rows

Contributors

GET /cluster/counter/tables/{counter_table.name}/rows

Introduced In: 9.11

Returns a collection of counter rows.

Parameters

Name Type In Required Description

counter_table.name

string

path

True

Counter table name.

properties.name

string

query

False

Filter by properties.name

properties.value

string

query

False

Filter by properties.value

aggregation.count

integer

query

False

Filter by aggregation.count

aggregation.complete

boolean

query

False

Filter by aggregation.complete

counters.name

string

query

False

Filter by counters.name

counters.value

integer

query

False

Filter by counters.value

counters.labels

string

query

False

Filter by counters.labels

counters.values

integer

query

False

Filter by counters.values

counters.counters.label

string

query

False

Filter by counters.counters.label

counters.counters.values

integer

query

False

Filter by counters.counters.values

id

string

query

False

Filter by id

order_by

array[string]

query

False

Order results by specified fields and optional [asc

desc] direction. Default direction is 'asc' for ascending.

fields

array[string]

query

False

Specify the fields to return.

max_records

integer

query

False

Limit the number of records returned.

return_records

boolean

query

False

The default is true for GET calls. When set to false, only the number of records is returned.

  • Default value: 1

return_timeout

integer

query

False

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

records

array[counter_row]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "records": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "counter_table": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "string"
      },
      "counters": [
        {
          "counters": [
            {
              "label": "string",
              "values": [
                "integer"
              ]
            }
          ],
          "labels": [
            "string"
          ],
          "name": "string",
          "values": [
            "integer"
          ]
        }
      ],
      "id": "string",
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ]
    }
  ]
}

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

8585320

Table requested is not found

8586228

Invalid counter name request.

8586229

Invalid counter property request.

Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

next

href

self

href

Name Type Description

self

href

instance_counter_aggregation

Aggregation information about this counter.

Name Type Description

complete

boolean

The aggregation state for this row. For non-aggregated tables: Not present For aggregated tables: If all requests to remote nodes for counter data are successful, then this value will be 'true'. If any requests to remote nodes fail, then this value will be 'false'.

count

integer

Number of nodes included in the aggregation of this counter.

counter_table_reference

Counter table reference.

Name Type Description

_links

_links

name

string

Counter table name.

counter2d

Counters that represent the second dimension of a two-dimension counter.

Name Type Description

label

string

Second dimension label.

values

array[integer]

List of values for the counter.

counter

Representation of a counter and contains one of the following:

  • Scalar counter populates the 'name' and 'value' fields.

  • A 1D array populates the 'name', 'labels' and 'values' fields.

  • A 2D array is represented as a list of counter entries.

"counters": [
  // Scalar counter
  {
      "name": "memory",
      "value": 4480
  },
  // one dimensional array "sys_read_latency_hist"
  {
      "name": "sys_read_latency_hist",
      "labels": ["0 - <1ms", "1 - <2ms", ...],
      "values": [0, 0, ...]
  },
  // Two dimensional array "foo" with ["Label 1", "Label 2"] as the first
  // array dimension and labels ["w", "x", "y"] for the 2nd dimension
  {
      "name": "foo",
      "labels": ["Label 1", "Label 2"],
      "counters": [
          {
              "label": "x",
              "values": [0, 0]
          },
          {
              "label": "y",
              "values": [0, 0]
          },
          {
              "label": "z",
              "values": [0, 0]
          }
      ]
  }
Name Type Description

counters

array[counter2d]

List of labels and values for the second dimension.

labels

array[string]

List of labels for the first dimension.

name

string

Counter name.

value

integer

Scalar value.

values

array[integer]

List of values in a one-dimensional counter.

counter_property

Single string counter entry.

Name Type Description

name

string

Property name.

value

string

Property value.

counter_row

A single row of counter and property counter data.

Name Type Description

_links

_links

aggregation

instance_counter_aggregation

Aggregation information about this counter.

counter_table

counter_table_reference

Counter table reference.

counters

array[counter]

Array of counter name/value pairs.

id

string

Unique row idenfier.

properties

array[counter_property]

Array of property name/value pairs.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.