Statistics endpoint
===================

.. http:get:: /api/v1/servers/:server_id/statistics?statistic=:statistic

  Query PowerDNS internal statistics.
  Returns a list of :json:object:`StatisticItem` elements.

  The :ref:`metricnames <metricnames>` page describes the names and meanings of these items.
 
  :param server_id: The name of the server

  :query statistic: If 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

  **Example response:**

  .. code-block:: json

    [{"name": "all-outqueries", "type": "StatisticItem", "value": "341"}, {"name": "answers-slow", "type": "StatisticItem", "value": "0"}, {"name": "answers0-1", "type": "StatisticItem", "value": "0"}, {"name": "answers1-10", "type": "StatisticItem", "value": "0"}, {"name": "answers10-100", "type": "StatisticItem", "value": "0"}, {"name": "answers100-1000", "type": "StatisticItem", "value": "0"}, {"name": "auth4-answers-slow", "type": "StatisticItem", "value": "200"}, {"name": "auth4-answers0-1", "type": "StatisticItem", "value": "13"}, {"name": "auth4-answers1-10", "type": "StatisticItem", "value": "1"}, {"name": "auth4-answers10-100", "type": "StatisticItem", "value": "68"}, {"name": "auth4-answers100-1000", "type": "StatisticItem", "value": "19"}, {"name": "auth6-answers-slow", "type": "StatisticItem", "value": "0"}, {"name": "auth6-answers0-1", "type": "StatisticItem", "value": "0"}, {"name": "auth6-answers1-10", "type": "StatisticItem", "value": "0"}, {"name": "auth6-answers10-100", "type": "StatisticItem", "value": "0"}, {"name": "auth6-answers100-1000", "type": "StatisticItem", "value": "0"}, {"name": "cache-entries", "type": "StatisticItem", "value": "124"}, {"name": "cache-hits", "type": "StatisticItem", "value": "0"}, {"name": "cache-misses", "type": "StatisticItem", "value": "0"}, {"name": "case-mismatches", "type": "StatisticItem", "value": "0"}, {"name": "chain-resends", "type": "StatisticItem", "value": "0"}, {"name": "client-parse-errors", "type": "StatisticItem", "value": "0"}, {"name": "concurrent-queries", "type": "StatisticItem", "value": "1"}, {"name": "dlg-only-drops", "type": "StatisticItem", "value": "0"}, {"name": "dnssec-queries", "type": "StatisticItem", "value": "0"}, {"name": "dnssec-result-bogus", "type": "StatisticItem", "value": "0"}, {"name": "dnssec-result-indeterminate", "type": "StatisticItem", "value": "0"}, {"name": "dnssec-result-insecure", "type": "StatisticItem", "value": "0"}, {"name": "dnssec-result-nta", "type": "StatisticItem", "value": "0"}, {"name": "dnssec-result-secure", "type": "StatisticItem", "value": "9"}, {"name": "dnssec-validations", "type": "StatisticItem", "value": "9"}, {"name": "dont-outqueries", "type": "StatisticItem", "value": "0"}, {"name": "edns-ping-matches", "type": "StatisticItem", "value": "0"}, {"name": "edns-ping-mismatches", "type": "StatisticItem", "value": "0"}, {"name": "failed-host-entries", "type": "StatisticItem", "value": "0"}, {"name": "fd-usage", "type": "StatisticItem", "value": "25"}, {"name": "ignored-packets", "type": "StatisticItem", "value": "0"}, {"name": "ipv6-outqueries", "type": "StatisticItem", "value": "0"}, {"name": "ipv6-questions", "type": "StatisticItem", "value": "0"}, {"name": "malloc-bytes", "type": "StatisticItem", "value": "0"}, {"name": "max-mthread-stack", "type": "StatisticItem", "value": "0"}, {"name": "negcache-entries", "type": "StatisticItem", "value": "1"}, {"name": "no-packet-error", "type": "StatisticItem", "value": "0"}, {"name": "noedns-outqueries", "type": "StatisticItem", "value": "0"}, {"name": "noerror-answers", "type": "StatisticItem", "value": "0"}, {"name": "noping-outqueries", "type": "StatisticItem", "value": "0"}, {"name": "nsset-invalidations", "type": "StatisticItem", "value": "0"}, {"name": "nsspeeds-entries", "type": "StatisticItem", "value": "26"}, {"name": "nxdomain-answers", "type": "StatisticItem", "value": "0"}, {"name": "outgoing-timeouts", "type": "StatisticItem", "value": "200"}, {"name": "outgoing4-timeouts", "type": "StatisticItem", "value": "200"}, {"name": "outgoing6-timeouts", "type": "StatisticItem", "value": "0"}, {"name": "over-capacity-drops", "type": "StatisticItem", "value": "0"}, {"name": "packetcache-entries", "type": "StatisticItem", "value": "0"}, {"name": "packetcache-hits", "type": "StatisticItem", "value": "0"}, {"name": "packetcache-misses", "type": "StatisticItem", "value": "0"}, {"name": "policy-drops", "type": "StatisticItem", "value": "0"}, {"name": "policy-result-custom", "type": "StatisticItem", "value": "0"}, {"name": "policy-result-drop", "type": "StatisticItem", "value": "0"}, {"name": "policy-result-noaction", "type": "StatisticItem", "value": "0"}, {"name": "policy-result-nodata", "type": "StatisticItem", "value": "0"}, {"name": "policy-result-nxdomain", "type": "StatisticItem", "value": "0"}, {"name": "policy-result-truncate", "type": "StatisticItem", "value": "0"}, {"name": "qa-latency", "type": "StatisticItem", "value": "0"}, {"name": "questions", "type": "StatisticItem", "value": "0"}, {"name": "real-memory-usage", "type": "StatisticItem", "value": "3502080"}, {"name": "resource-limits", "type": "StatisticItem", "value": "13"}, {"name": "security-status", "type": "StatisticItem", "value": "0"}, {"name": "server-parse-errors", "type": "StatisticItem", "value": "0"}, {"name": "servfail-answers", "type": "StatisticItem", "value": "0"}, {"name": "spoof-prevents", "type": "StatisticItem", "value": "0"}, {"name": "sys-msec", "type": "StatisticItem", "value": "2613"}, {"name": "tcp-client-overflow", "type": "StatisticItem", "value": "0"}, {"name": "tcp-clients", "type": "StatisticItem", "value": "0"}, {"name": "tcp-outqueries", "type": "StatisticItem", "value": "0"}, {"name": "tcp-questions", "type": "StatisticItem", "value": "0"}, {"name": "throttle-entries", "type": "StatisticItem", "value": "0"}, {"name": "throttled-out", "type": "StatisticItem", "value": "0"}, {"name": "throttled-outqueries", "type": "StatisticItem", "value": "0"}, {"name": "too-old-drops", "type": "StatisticItem", "value": "0"}, {"name": "udp-in-errors", "type": "StatisticItem", "value": "0"}, {"name": "udp-noport-errors", "type": "StatisticItem", "value": "4163"}, {"name": "udp-recvbuf-errors", "type": "StatisticItem", "value": "0"}, {"name": "udp-sndbuf-errors", "type": "StatisticItem", "value": "0"}, {"name": "unauthorized-tcp", "type": "StatisticItem", "value": "0"}, {"name": "unauthorized-udp", "type": "StatisticItem", "value": "0"}, {"name": "unexpected-packets", "type": "StatisticItem", "value": "0"}, {"name": "unreachables", "type": "StatisticItem", "value": "0"}, {"name": "uptime", "type": "StatisticItem", "value": "96590"}, {"name": "user-msec", "type": "StatisticItem", "value": "2012"}]
