From 7992bf41777c3af18cdcd32b66694b23e8a7c3c9 Mon Sep 17 00:00:00 2001 From: Alvaro Saurin Date: Thu, 19 Nov 2015 14:54:23 +0100 Subject: [PATCH 1/2] DNS upstream servers report --- nameserver/status.go | 10 ++++++---- prog/weaver/http.go | 7 +++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/nameserver/status.go b/nameserver/status.go index 6124f08d..2a280c57 100644 --- a/nameserver/status.go +++ b/nameserver/status.go @@ -1,10 +1,11 @@ package nameserver type Status struct { - Domain string - Address string - TTL uint32 - Entries []EntryStatus + Domain string + Upstream []string + Address string + TTL uint32 + Entries []EntryStatus } type EntryStatus struct { @@ -37,6 +38,7 @@ func NewStatus(ns *Nameserver, dnsServer *DNSServer) *Status { return &Status{ dnsServer.domain, + dnsServer.upstream.Servers, dnsServer.address, dnsServer.ttl, entryStatusSlice} diff --git a/prog/weaver/http.go b/prog/weaver/http.go index cb828f47..6794967e 100644 --- a/prog/weaver/http.go +++ b/prog/weaver/http.go @@ -25,6 +25,12 @@ var rootTemplate = template.New("root").Funcs(map[string]interface{}{ } return count }, + "upstreamServers": func(servers []string) string { + if len(servers) == 0 { + return "none" + } + return strings.Join(servers, ", ") + }, "printConnectionCounts": func(conns []mesh.LocalConnectionStatus) string { counts := make(map[string]int) for _, conn := range conns { @@ -108,6 +114,7 @@ var statusTemplate = defTemplate("status", `\ Service: dns Domain: {{.DNS.Domain}} + Upstream: {{upstreamServers .DNS.Upstream}} TTL: {{.DNS.TTL}} Entries: {{countDNSEntries .DNS.Entries}} {{end}}\ From 03ce6052cc506d90d9008ee99ae100b9a2484ce7 Mon Sep 17 00:00:00 2001 From: Alvaro Saurin Date: Fri, 13 Nov 2015 12:20:28 +0100 Subject: [PATCH 2/2] Updated docs --- site/weavedns.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/weavedns.md b/site/weavedns.md index e3da2fcc..0cdf6a3e 100644 --- a/site/weavedns.md +++ b/site/weavedns.md @@ -260,6 +260,7 @@ DNS: Service: dns Domain: weave.local. + Upstream: 8.8.8.8, 8.8.4.4 TTL: 1 Entries: 9 @@ -272,6 +273,7 @@ guide](troubleshooting.html#weave-status) for more detail. The 'Service: dns' section is pertinent to weaveDNS, and includes: * The local domain suffix which is being served +* The list of upstream servers used for resolving names not in the local domain * The response ttl * The total number of entries