COREDNS-ERRORS(7)
π
COREDNS-ERRORS(7) β the errors plugin, explained by your fav Unix bestie
okay so welcome to the CoreDNS Plugins girlies, this one's called errors and it literally enables error logging. that's the whole vibe. let's get into it β¨
πΈ NAME
errors β enables error logging. yes bestie, that's it, that's the name π
π¦ DESCRIPTION
So the way that this works: any errors encountered during the query processing will be printed to standard output. like, all of them, out loud, to stdout, no filter π
But here's the iconic part β errors of a particular type can be consolidated and printed once per some period of time. so instead of getting spammed with the same error 400 times you get one cute little summary. main character energy fr fr π
β οΈ heads up bestie: this plugin can only be used once per Server Block. one per block. don't be greedy. π
β¨ SYNTAX
The basic syntax is giving minimalist:
errors
Extra knobs are available with an expanded syntax (the glow-up version):
errors {
stacktrace
consolidate DURATION REGEXP [LEVEL] [show_first]
}
okay let's break down the options, because there's lore π
stacktraceβ this option will log a stacktrace during panic recovery. when things go π, you get receipts.consolidate DURATION REGEXP [LEVEL] [show_first]β allows collecting several error messages matching the regular expression REGEXP during DURATION. some deets:- REGEXP must not exceed 10000 characters. like, keep it reasonable babe.
- After the DURATION since receiving the first such message, the consolidated message will be printed to standard output with log level, which is configurable by the optional option LEVEL.
- Supported options for LEVEL:
warning,error,infoanddebug. that's the whole menu π
and it looks like this when it fires:
2 errors like '^read udp .* i/o timeout$' occurred in last 30s
Now the show_first flag β this one's lowkey the best feature π«Ά if the optional show_first flag is specified, the first error will be logged immediately when it occurs, and then subsequent matching errors will be consolidated. When the consolidation period ends:
- If only one error occurred, no summary is printed (since it was already logged) β no dupe, we respect the dupe rules.
- If multiple errors occurred, a summary is printed showing the total count.
Example with 3 errors (look at her go):
[WARNING] 2 example.org. A: read udp 10.0.0.1:53->8.8.8.8:53: i/o timeout
[WARNING] 3 errors like '^read udp .* i/o timeout$' occurred in last 30s
Example with 1 error (she said "no summary needed"):
[WARNING] 2 example.org. A: read udp 10.0.0.1:53->8.8.8.8:53: i/o timeout
Multiple consolidate options with different DURATION and REGEXP are allowed π―ββοΈ In case if some error message corresponds to several defined regular expressions, the message will be associated with the first appropriate REGEXP. first come first served, that's the rule.
For better performance, it's recommended to use the ^ or $ metacharacters in regular expression when filtering error messages by prefix or suffix, e.g. ^failed to .*, or .* timeout$. performance slay π
do it. iykyk.
π EXAMPLES
Example one β use the whoami to respond to queries in the example.org domain and Log errors to standard output:
example.org {
whoami
errors
}
Example two β use the forward plugin to resolve queries via 8.8.8.8 and print consolidated messages for errors with suffix " i/o timeout" as warnings, and errors with prefix "Failed to " as errors:
. {
forward . 8.8.8.8
errors {
consolidate 5m ".* i/o timeout$" warning
consolidate 30s "^Failed to .+"
}
}
Example three β use the forward plugin and consolidate timeout errors with show_first option to see both the summary and the first occurrence of the error:
. {
forward . 8.8.8.8
errors {
consolidate 5m ".* i/o timeout$" warning show_first
consolidate 30s "^Failed to .+" error show_first
}
}
π sign-off
that's the whole page bestie, no cap π§ this one's from the CoreDNS girlies, March 2026, manual page COREDNS-ERRORS(7) β go forth and log those errors, periodt ππ₯
π¦ where this page comes from
- nixpkgs unstable: coredns 1.14.7
- opensuse-leap 16.0: coredns-extras 1.15.0-bp160.1.1 Β· Apache-2.0 AND MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms