How can we help?

Statistics - Device API

Follow

The Auvik Statistics API allows you to view device, interface, and component statistics recorded by Auvik.

For details on a specific endpoint or cURL example, click the endpoint name listed below. API documentation opens in a new window.

There are four available endpoints that are part of devices in the Statistics API:

Before using the Statistics API, please read the Timestamps section.

Read Device Statistics

Read device statistics pulls detailed statistics of devices in a site (and children if it’s a multi-site). The statistic, the statistic ID, and the list of data points included in each statistic are listed in the table below. An entry is returned for each device. The device ID and tenant ID are in the relationships field.

Statistic

Stat ID

Data Point

Bandwidth

bandwidth

  • time (unix minutes)
  • average transmitted (bits per second)
  • average received (bits per second)
  • average total (bits per second)

CPU utilization

cpuUtilization

  • time (unix minutes)
  • average (percent)

Memory utilization

memoryUtilization

  • time (unix minutes)
  • average (percent)

Storage utilization

storageUtilization

  • time (unix minutes)
  • average (percent)

Unicast, multicast, and broadcast packet rates

packetUnicast

packetMulticast

packetBroadcast

  • time (unix minutes)
  • average transmitted (packets per second)
  • average received (packets per second)

 

Read device availability statistics

Read device availability statistics pulls detailed availability statistics of devices in a site (and children if it’s a multi-site). The statistic, the statistic ID, and the list of data points included in each statistic are listed in the table below.

Statistic

Stat ID

Data Point

Uptime percentage

uptime

  • time (unix minutes)
  • average time online (percent)

Outage

outage

  • time (unix minutes)
  • total time offline (seconds)

 

The device is listed in the relationships field. An entry is returned for each device. The device ID and tenant ID are in the relationships field.

Read interface statistics

Read interface statistics pulls detailed statistics of interfaces in a site (and children if it’s a multi-site). The statistic, the statistic ID, and the list of data points included in each statistic are listed in the table below.

Statistic

Stat ID

Data Point

Bandwidth

bandwidth

  • time (unix minutes)
  • average transmitted (bits per second)
  • average received (bits per second)
  • average total (bits per second)

Utilization

utilization

  • time (unix minutes)
  • average total (percent)
  • average transmitted (percent)
  • average received (percent)

Packet loss rate

packetLoss

  • time (unix minutes)
  • average total (packets per second)
  • average transmitted loss (packets per second)
  • average received loss (packets per second)

Packet discard rate

packetDiscard

  • time (unix minutes)
  • average total (packets per second)
  • average transmitted discard (packets per second)
  • average received discard (packets per second)

Unicast, multicast, broadcast packets

packetUnicast

packetMulticast

packetBroadcast

  • time (unix minutes)
  • average transmitted (packets per second)
  • average received (packets per second)

 

An entry is returned for each interface. The interface ID, parent device ID, and tenant ID are in the relationships field.

Read component statistics

Read component statistics pulls detailed statistics of components in a site (and children if it’s a multi-site). The statistic, the statistic ID, and the list of data points included in each statistic are listed in the table below.

CPU

Statistic

Stat ID

Data Point

Capacity

capacity

  • time (unix minutes)
  • Average (megahertz)

Latency

latency

  • time (unix minutes)
  • average (percent)

Readiness

readiness

  • time (unix minutes)
  • average (percent)

Ready

ready

  • time (unix minutes)
  • average (milliseconds)

Swap wait

swap

  • time (unix minutes)
  • average (milliseconds)

CPU Core

Statistic

Stat ID

Data Point

Idle

idle

  • time (unix minutes)
  • average (milliseconds)

Utilization

utilization

  • time (unix minutes)
  • average (percent)

Disk

Statistic

Stat ID

Data Point

Latency

latency

  • time (unix minutes)
  • average read (milliseconds)
  • average write (milliseconds)

Queue latency

queueLatency

  • time (unix minutes)
  • average read (milliseconds)
  • average write (milliseconds)

Rate

rate

  • time (unix minutes)
  • average read (kilobytes per second)
  • average write (kilobytes per second)

Total latency

totalLatency

  • time (unix minutes)
  • average read (milliseconds)
  • average write (milliseconds)

Fan

Statistic

Stat ID

Data Point

Speed

speed

  • time (unix minutes)
  • average (rpm)

Memory

Statistic

Stat ID

Data Point

Counters

counters

  • time (unix minutes)
  • average allocated balloon (megabytes)
  • average consumed (megabytes)
  • average overhead (megabytes)
  • average reserved (megabytes)
  • average unreserved (megabytes)

Swap

swap

  • time (unix minutes)
  • average in (megabytes)
  • average out (megabytes)

Swap rate

swapRate

  • time (unix minutes)
  • average in (kilobytes per second)
  • average out (kilobytes per second)

Temperature

temperature

  • time (unix minutes)
  • average (celsius)

Power Supply

Statistic

Stat ID

Data Point

Power

power

  • time (unix minutes)
  • average voltage (volts)
  • average current (amps)
  • average power (watts)

System Board

Statistic

Stat ID

Data Point

Temperature

temperature

  • time (unix minutes)
  • average (celsius)

 

An entry is returned for each component. The component ID, parent device ID, and tenant ID are in the relationships field.

Timestamps

In all the descriptions above, time is the unix timestamp in minutes representing when the data point is recorded. This occurs at the end of the interval. 

For example, if the interval is set to hourly, then the data point is recorded at the beginning of the next hour. The data point that represents the statistic for the time interval from 1:00 p.m. to 2:00 p.m. is recorded at 2:00 p.m. There are three things to take note of here and we’ll illustrate using an hourly interval.

To capture all data points for 1 day, you need to set the filters to filter[fromTime] to 12 a.m. the current day and filter[thruTime] to 12 a.m. the next day. 

https://auvikapi.us2.my.auvik.com/v1/stat/device/bandwidth?filter[fromTime]=2020-09-01T00:00:00.000Z&filter[thruTime]=2020-09-02T00:00:00.000Z&filter[interval]="hour"&filter[deviceId]=NzkyMzyzMjAwOZMwNTc4MDUzMjg2LAg&tenants=123456789012345678&page[first]=50

The API response will include an attributes object with a description of the statistics and the data points:

"attributes": {

"reportPeriod": {

     "fromTime": "2020-09-01T00:00:00.000Z",

     "thruTime": "2020-09-02T00:00:00.000Z"

},

"interval": "hour",

"statType": "deviceBandwidth",

"stats": [

     {

         "legend": [

             "Recorded At",

             "Transmit",

             "Receive",

             "Bandwidth"

         ],

         "unit": [

             "unix_mins",

             "bits_per_sec",

             "bits_per_sec",

             "bits_per_sec"

         ],

         "data": [

             [

                 26648700,

                 429220,

                 459335,

                 888555

             ],

             [

                 26648760,

                 333506,

                 356849,

                 690355

             ],

             [

                 26648820,

                 415272,

                 446054,

                 861326

             ],

             [

                 26648880,

                 410369,

                 441050,

                 851419

             ],

             [

                 26648940,

                 414771,

                 446854,

                 861625

             ],

             [

                 26649000,

                 409957,

                 440509,

                 850466

             ],

             [

                 26649060,

                 414546,

                 445989,

                 860535

             ],

             [

                 26649120,

                 300272,

                 322354,

                 622626

             ],

             [

                 26649180,

                 406035,

                 436273,

                 842308

             ],

             [

                 26649240,

                 414772,

                 445498,

                 860270

             ],

             [

                 26649300,

                 412679,

                 443176,

                 855855

             ],

             [

                 26649360,

                 428046,

                 458037,

                 886083

             ],

             [

                 26649420,

                 436317,

                 467159,

                 903476

             ],

             [

                 26649480,

                 428178,

                 458719,

                 886897

             ],

             [

                 26649540,

                 433840,

                 464663,

                 898503

             ],

             [

                 26649600,

                 441621,

                 472646,

                 914267

             ],

             [

                 26649660,

                 438784,

                 468843,

                 907627

             ],

             [

                 26649720,

                 437182,

                 468212,

                 905393

             ],

             [

                 26649780,

                 431165,

                 463129,

                 894294

             ],

             [

                 26649840,

                 440732,

                 471962,

                 912694

             ],

             [

                 26649900,

                 433472,

                 463853,

                 897325

             ],

             [

                 26649960,

                 434610,

                 471183,

                 905794

             ],

             [

                 26650020,

                 433357,

                 463528,

                 896885

             ],

             [

                 26650080,

                 443499,

                 475056,

                 918555

             ]

         ]

     }

]

}

The first data point has the recorded-at time of 26648700 in unix minutes, which is 1598922000 in seconds. This is 1:00 a.m. UTC on September 1, 2020, and the following data represents the statistic for the time interval from 12:00 a.m. UTC to 1:00 a.m. on September 1, 2020. 

The last data point has the recorded-at time of 26650080 in unix minutes, which is 1599004800 in seconds. This is 12:00 a.m. UTC on September 2, 2020 and the following data represents the statistic for the time interval from 11:00 p.m. UTC to 12:00 a.m. on September 2, 2020.

Limits

Maximum page size

For the statistics API, the maximum page size, page[first] and page[last], is 100.

Maximum time range

For the statistics API, the following maximum time ranges, the difference of filter[fromTime] from filter[thruTime], for each statistic interval, filter[interval] are as follows:

Interval

Maximum time range

minute

1 day

hour

31 days

day

1 year

 

If you want to capture a time range greater than the maximum time range, then the desired time range needs to be broken down into multiple smaller time ranges that adhere to the maximums listed above. When specifying the time range, take note of how the filters work as described in Timestamps.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request