惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
T
The Blog of Author Tim Ferriss
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
D
Docker
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
雷峰网
雷峰网
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
美团技术团队
C
Cisco Blogs
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
Latest news
Latest news
博客园 - 三生石上(FineUI控件)
博客园 - Franky
Attack and Defense Labs
Attack and Defense Labs
C
CERT Recently Published Vulnerability Notes
S
Secure Thoughts
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
W
WeLiveSecurity
The Register - Security
The Register - Security
T
Tenable Blog
J
Java Code Geeks
The Cloudflare Blog
有赞技术团队
有赞技术团队
博客园 - 聂微东
P
Palo Alto Networks Blog
Security Latest
Security Latest
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
SegmentFault 最新的问题
H
Hacker News: Front Page
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Exploit Database - CXSecurity.com
S
Security @ Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Hacker News: Ask HN
Hacker News: Ask HN

Plugins on CoreDNS: DNS and Service Discovery

kubernetes log proxyproto rewrite forward clouddns grpc_server https https3 template auto geoip multisocket nomad dnstap import view ready etcd header loadbalance bind grpc file prometheus quic timeouts autopath dnssec root tls bufsize k8s_external reload acl cache health trace tsig route53 dns64 transfer secondary loop minimal sign azure local any cancel debug erratic metadata nsid pprof hosts chaos whoami
errors
2026-01-08 · via Plugins on CoreDNS: DNS and Service Discovery

Description

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.

This plugin can only be used once per Server Block.

Syntax

The basic syntax is:

errors

Extra knobs are available with an expanded syntax:

errors {
	stacktrace
	consolidate DURATION REGEXP [LEVEL] [show_first]
}

Option stacktrace will log a stacktrace during panic recovery.

Option consolidate allows collecting several error messages matching the regular expression REGEXP during DURATION. REGEXP must not exceed 10000 characters. 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 optional option LEVEL. Supported options for LEVEL option are warning,error,info and debug.

2 errors like '^read udp .* i/o timeout$' occurred in last 30s

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)
  • If multiple errors occurred, a summary is printed showing the total count

Example with 3 errors:

[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:

[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.

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$.

Examples

Use the whoami to respond to queries in the example.org domain and Log errors to standard output.

example.org {
    whoami
    errors
}

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 .+"
    }
}

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
    }
}