Add complete secondary support

Respond to notifies and allow a secondary to follow the SOA parameters

to update a zone from a primary. Also sprinkle it with logging.



Also extend monitoring to include qtype in more metrics.
This commit is contained in:
Miek Gieben
2016-04-05 10:53:23 +01:00
parent 20e16491ec
commit c961acbb6e
8 changed files with 207 additions and 21 deletions

View File

@@ -25,9 +25,9 @@ func (m *Metrics) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
status, err := m.Next.ServeDNS(ctx, rw, r)
requestCount.WithLabelValues(zone, qtype).Inc()
requestDuration.WithLabelValues(zone).Observe(float64(time.Since(rw.Start()) / time.Second))
responseSize.WithLabelValues(zone).Observe(float64(rw.Size()))
responseRcode.WithLabelValues(zone, strconv.Itoa(rw.Rcode())).Inc()
requestDuration.WithLabelValues(zone, qtype).Observe(float64(time.Since(rw.Start()) / time.Second))
responseSize.WithLabelValues(zone, qtype).Observe(float64(rw.Size()))
responseRcode.WithLabelValues(zone, strconv.Itoa(rw.Rcode()), qtype).Inc()
return status, err
}