@@ -64,11 +64,12 @@ The output of the template must be a [RFC 1035](https://tools.ietf.org/html/rfc1
...
@@ -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:
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_matches_total{server, 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_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{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_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.