93 lines
1.9 KiB
Groff
93 lines
1.9 KiB
Groff
.\" Generated by Mmark Markdown Processer - mmark.miek.nl
|
|
.TH "COREDNS-ERRORS" 7 "March 2021" "CoreDNS" "CoreDNS Plugins"
|
|
|
|
.SH "NAME"
|
|
.PP
|
|
\fIerrors\fP - enables error logging.
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
Any errors encountered during the query processing will be printed to standard output. The errors of particular type can be consolidated and printed once per some period of time.
|
|
|
|
.PP
|
|
This plugin can only be used once per Server Block.
|
|
|
|
.SH "SYNTAX"
|
|
.PP
|
|
The basic syntax is:
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
errors
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Extra knobs are available with an expanded syntax:
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
errors {
|
|
consolidate DURATION REGEXP
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Option \fB\fCconsolidate\fR allows collecting several error messages matching the regular expression \fBREGEXP\fP during \fBDURATION\fP. After the \fBDURATION\fP since receiving the first such message, the consolidated message will be printed to standard output, e.g.
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
2 errors like '^read udp .* i/o timeout$' occurred in last 30s
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Multiple \fB\fCconsolidate\fR options with different \fBDURATION\fP and \fBREGEXP\fP are allowed. In case if some error message corresponds to several defined regular expressions the message will be associated with the first appropriate \fBREGEXP\fP.
|
|
|
|
.PP
|
|
For better performance, it's recommended to use the \fB\fC^\fR or \fB\fC$\fR metacharacters in regular expression when filtering error messages by prefix or suffix, e.g. \fB\fC^failed to .*\fR, or \fB\fC.* timeout$\fR.
|
|
|
|
.SH "EXAMPLES"
|
|
.PP
|
|
Use the \fIwhoami\fP to respond to queries in the example.org domain and Log errors to standard output.
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
example.org {
|
|
whoami
|
|
errors
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|
|
.PP
|
|
Use the \fIforward\fP to resolve queries via 8.8.8.8 and print consolidated error messages for errors with suffix " i/o timeout" or with prefix "Failed to ".
|
|
|
|
.PP
|
|
.RS
|
|
|
|
.nf
|
|
\&. {
|
|
forward . 8.8.8.8
|
|
errors {
|
|
consolidate 5m ".* i/o timeout$"
|
|
consolidate 30s "^Failed to .+"
|
|
}
|
|
}
|
|
|
|
.fi
|
|
.RE
|
|
|