Statistics

Endpoints

GET /servers/{server_id}/statistics

Query statistics.

Query PowerDNS internal statistics.

Parameters:
  • server_id (string) – The id of the server to retrieve
Query Parameters:
 
  • statistic (string) – When set to the name of a specific statistic, only this value is returned. If no statistic with that name exists, the response has a 422 status and an error message.
  • includerings (boolean) – “true” (default) or “false”, whether to include the Ring items, which can contain thousands of log messages or queried domains. Setting this to ”false” may make the response a lot smaller.
Status Codes:

Objects

The Statistics endpoint returns an array of objects that can be StatisticItem, MapStatisticItem or RingStatisticItem :

StatisticItem
Object Properties:
 
  • name (string) – Item name
  • type (string) – set to “StatisticItem”
  • value (string) – Item value
MapStatisticItem
Object Properties:
 
  • name (string) – Item name
  • type (string) – Set to “MapStatisticItem”
  • value ([SimpleStatisticItem]) – Named values
RingStatisticItem
Object Properties:
 
  • name (string) – Item name
  • type (string) – Set to “RingStatisticItem”
  • size (integer) – Ring size
  • value ([SimpleStatisticItem]) – Named values

Both MapStatisticItem and RingStatisticItem objects contains an array of SimpleStatisticItem

SimpleStatisticItem
Object Properties:
 
  • name (string) – Item name
  • value (string) – Item value