Skip to content

Commit

Permalink
need to reference rcodes in Server struct
Browse files Browse the repository at this point in the history
Signed-off-by: christian-simmen <[email protected]>
  • Loading branch information
christian-simmen committed Jul 26, 2021
1 parent e08083d commit a961e03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type Server struct {
IncomingRequests []Counter
NameServerStats []Counter
ZoneStatistics []Counter
ServerRcodes []Counter
}

// View represents statistics for a single BIND view.
Expand Down
3 changes: 3 additions & 0 deletions bind/v3/v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const (
resqtype = "resqtype"
resstats = "resstats"
zonestat = "zonestat"
rcode = "rcode"
)

type Statistics struct {
Expand Down Expand Up @@ -120,6 +121,8 @@ func (c *Client) Stats(groups ...bind.StatisticGroup) (bind.Statistics, error) {
s.Server.NameServerStats = c.Counters
case zonestat:
s.Server.ZoneStatistics = c.Counters
case rcode:
s.Server.ServerRcodes = c.Counters
}
}

Expand Down
2 changes: 1 addition & 1 deletion bind_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (c *serverCollector) Collect(ch chan<- prometheus.Metric) {
)
}
}
for _, s := range c.stats.Server.serverRcodes {
for _, s := range c.stats.Server.ServerRcodes {
ch <- prometheus.MustNewConstMetric(
serverRcodes, prometheus.CounterValue, float64(s.Counter), s.Name,
)
Expand Down

0 comments on commit a961e03

Please sign in to comment.