Permalink
Browse files

Set port to 8053 in BIND configuration example, fix typos (#36)

* Set port to 8053 in BIND configuration example

* Fix typos, fix #23
  • Loading branch information...
elnappo authored and cagedmantis committed Mar 7, 2018
1 parent dae68f9 commit 38ef3a6caa68e8c42a08e72d51e90b00333e6894
Showing with 15 additions and 15 deletions.
  1. +1 −1 README.md
  2. +14 −14 bind_exporter.go
View
@@ -22,7 +22,7 @@ bind_exporter next to BIND, so it's only necessary to open a port locally.
```
statistics-channels {
inet 127.0.0.1 port 8080 allow { 127.0.0.1; };
inet 127.0.0.1 port 8053 allow { 127.0.0.1; };
};
```
View
@@ -46,12 +46,12 @@ var (
)
incomingQueries = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "incoming_queries_total"),
"Number of incomming DNS queries.",
"Number of incoming DNS queries.",
[]string{"type"}, nil,
)
incomingRequests = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "incoming_requests_total"),
"Number of incomming DNS requests.",
"Number of incoming DNS requests.",
[]string{"opcode"}, nil,
)
resolverCache = prometheus.NewDesc(
@@ -79,7 +79,7 @@ var (
"Number of resolver response errors received.",
[]string{"view", "error"}, nil,
)
resolverDNSSECSucess = prometheus.NewDesc(
resolverDNSSECSuccess = prometheus.NewDesc(
prometheus.BuildFQName(namespace, resolver, "dnssec_validation_success_total"),
"Number of DNSSEC validation attempts succeeded.",
[]string{"view", "result"}, nil,
@@ -124,28 +124,28 @@ var (
"SERVFAIL": resolverResponseErrors,
"FORMERR": resolverResponseErrors,
"OtherError": resolverResponseErrors,
"ValOk": resolverDNSSECSucess,
"ValNegOk": resolverDNSSECSucess,
"ValOk": resolverDNSSECSuccess,
"ValNegOk": resolverDNSSECSuccess,
}
serverQueryErrors = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "query_errors_total"),
"Number of query failures.",
[]string{"error"}, nil,
)
serverReponses = prometheus.NewDesc(
serverResponses = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "responses_total"),
"Number of responses sent.",
[]string{"result"}, nil,
)
serverLabelStats = map[string]*prometheus.Desc{
"QryDropped": serverQueryErrors,
"QryFailure": serverQueryErrors,
"QrySuccess": serverReponses,
"QryReferral": serverReponses,
"QryNxrrset": serverReponses,
"QrySERVFAIL": serverReponses,
"QryFORMERR": serverReponses,
"QryNXDOMAIN": serverReponses,
"QrySuccess": serverResponses,
"QryReferral": serverResponses,
"QryNxrrset": serverResponses,
"QrySERVFAIL": serverResponses,
"QryFORMERR": serverResponses,
"QryNXDOMAIN": serverResponses,
}
serverMetricStats = map[string]*prometheus.Desc{
"QryDuplicate": prometheus.NewDesc(
@@ -189,7 +189,7 @@ func (c *serverCollector) Describe(ch chan<- *prometheus.Desc) {
ch <- incomingQueries
ch <- incomingRequests
ch <- serverQueryErrors
ch <- serverReponses
ch <- serverResponses
for _, desc := range serverMetricStats {
ch <- desc
}
@@ -241,7 +241,7 @@ func newViewCollector(s *bind.Statistics) prometheus.Collector {
// Describe implements prometheus.Collector.
func (c *viewCollector) Describe(ch chan<- *prometheus.Desc) {
ch <- resolverDNSSECSucess
ch <- resolverDNSSECSuccess
ch <- resolverQueries
ch <- resolverQueryDuration
ch <- resolverQueryErrors

0 comments on commit 38ef3a6

Please sign in to comment.