Management Plane API > Networking > Services > DNS

Get the recent failed DNS queries

Return the given count of recent failed DNS queries from DNS forwarder.
Since the DNS forwarder is running in Acitve/Standby HA mode on transport
nodes, the given count of queries will be returned from each nodes. Hence
the total queries returned could be doubled.
If no count is specified, 100 recent failed queries are returned. If the
recent failures is less than the given count, all the failures will be
returned. The maximum count is 1,000.

Request:

Method:
GET
URI Path(s):
/api/v1/dns/forwarders/<forwarder-id>/failed-queries
Request Headers:
n/a
Query Parameters:
DnsFailedQueryRequestParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/dns/forwarders/f962173f-ac03-4d08-8366-56a41779f61d/failed-queries?count=10

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
DnsFailedQueries+

Example Response:

{ "timestamp" : "2019-02-12 09:08:12.120", "per_node_failed_queries" : [ { "count" : 2, "node_id" : "aedc2af2-4c5c-11e9-aa7d-0200400d53ef", "timestamp" : "2019-02-12 09:09:12.120", "results" : [ { "timestamp": "2019-02-11 18:20:20.026", "address" : "dev.vmware.com", "record_type" : "A", "query_target" : "DnsForwarder", "client_ip": "192.168.7.10", "forwarder_ip": "172.128.10.10", "source_ip": "192.168.7.10", "upstream_server_ip": "11.11.11.1", "time_spent": 120, "error_type": "NXDOMAIN", "error_message" : "NXDOMAIN" }, { "timestamp": "2019-02-11 08:21:28.200", "address" : "abc.vmware.com", "record_type" : "A", "query_target" : "Upstream Server", "client_ip": "11.11.11.11", "forwarder_ip": "172.128.11.77", "source_ip": "11.11.11.11", "upstream_server_ip": "8.8.8.8", "time_spent": 60008, "error_type": "timeout", "error_message" : "connection timeout" }] }, { "count" : 2, "node_id" : "c73e587c-4c5c-11e9-87cb-0200407787ca", "timestamp" : "2019-02-12 09:10:12.120", "results" : [ { "timestamp": "2019-02-11 18:20:20.026", "address" : "host1.vmc.vmware.com", "record_type" : "A", "query_target" : "DnsForwarder", "client_ip": "117.168.10.22", "forwarder_ip": "172.128.50.11", "source_ip": "192.168.7.10", "upstream_server_ip": "11.11.11.1", "time_spent": 1100, "error_type": "NXDOMAIN", "error_message" : "NXDOMAIN" }, { "timestamp": "2019-02-11 08:21:28.200", "address" : "host1.wix.vmware.com", "record_type" : "A", "query_target" : "Upstream Server", "client_ip": "22.22.22.22", "forwarder_ip": "172.128.5.8", "source_ip": "11.11.11.10", "upstream_server_ip": "9.9.9.9", "time_spent": 51002, "error_type": "timeout", "error_message" : "connection timeout" }] }] }

Required Permissions:

read

Feature:

dns_forwarder

Additional Errors: