mirror of
https://github.com/coredns/coredns.git
synced 2025-11-26 13:44:05 -05:00
plugin/template: update metrics to include server (#1731)
Add server label to the metrics and update the README.
This commit is contained in:
@@ -64,11 +64,12 @@ The output of the template must be a [RFC 1035](https://tools.ietf.org/html/rfc1
|
||||
|
||||
If monitoring is enabled (via the *prometheus* directive) then the following metrics are exported:
|
||||
|
||||
* `coredns_template_matches_total{regex}` the total number of matched requests by regex.
|
||||
* `coredns_template_template_failures_total{regex,section,template}` the number of times the Go templating failed. Regex, section and template label values can be used to map the error back to the config file.
|
||||
* `coredns_template_rr_failures_total{regex,section,template}` the number of times the templated resource record was invalid and could not be parsed. Regex, section and template label values can be used to map the error back to the config file.
|
||||
* `coredns_template_matches_total{server, regex}` the total number of matched requests by regex.
|
||||
* `coredns_template_template_failures_total{server, regex,section,template}` the number of times the Go templating failed. Regex, section and template label values can be used to map the error back to the config file.
|
||||
* `coredns_template_rr_failures_total{server, regex,section,template}` the number of times the templated resource record was invalid and could not be parsed. Regex, section and template label values can be used to map the error back to the config file.
|
||||
|
||||
Both failure cases indicate a problem with the template configuration.
|
||||
Both failure cases indicate a problem with the template configuration. The `server` label indicates
|
||||
the server incrementing the metric, see the *metrics* plugin for details.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user