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

推荐订阅源

博客园 - 聂微东
C
Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
V
Vulnerabilities – Threatpost
博客园 - Franky
A
Arctic Wolf
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
雷峰网
雷峰网
Blog — PlanetScale
Blog — PlanetScale
C
CERT Recently Published Vulnerability Notes
Spread Privacy
Spread Privacy
Latest news
Latest news
小众软件
小众软件
Google DeepMind News
Google DeepMind News
IT之家
IT之家
量子位
U
Unit 42
T
Threatpost
I
InfoQ
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
G
GRAHAM CLULEY
K
Kaspersky official blog
T
Tor Project blog
Scott Helme
Scott Helme
AWS News Blog
AWS News Blog
Hugging Face - Blog
Hugging Face - Blog
PCI Perspectives
PCI Perspectives
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Commits to openclaw:main
Recent Commits to openclaw:main
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
S
Securelist
L
LINUX DO - 热门话题
Apple Machine Learning Research
Apple Machine Learning Research
Cisco Talos Blog
Cisco Talos Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
D
DataBreaches.Net

plugin on CoreDNS: DNS and Service Discovery

kubernetes log proxyproto rewrite forward clouddns errors grpc_server https https3 template docker auto geoip multisocket nomad dnstap import view ready etcd header loadbalance bind grpc file prometheus quic timeouts kubeforward JSON gslb autopath dnssec root tls fanout k8s_cache bufsize k8s_external reload gathersrv meship meshname multicluster acl cache recursor trace tsig k8s_event redis route53 dns64 transfer finalize kubenodes ebpf rrl secondary mysql warnlist loop minimal sign azure git local any cancel debug erratic metadata nsid pprof alternate k8s_dns_chaos records k8s_gateway hosts netbox mdns wgsd alias chaos whoami lighthouse ens idetcd gravwell amazondns kubernetai redisc unbound on dump pdsql ipin demo example
health
2022-09-09 · via plugin on CoreDNS: DNS and Service Discovery

Description

Enabled process wide health endpoint. When CoreDNS is up and running this returns a 200 OK HTTP status code. The health is exported, by default, on port 8080/health.

Syntax

health [ADDRESS]

Optionally takes an address; the default is :8080. The health path is fixed to /health. The health endpoint returns a 200 response code and the word “OK” when this server is healthy.

An extra option can be set with this extended syntax:

health [ADDRESS] {
    lameduck DURATION
}
  • Where lameduck will delay shutdown for DURATION. /health will still answer 200 OK. Note: The ready plugin will not answer OK while CoreDNS is in lame duck mode prior to shutdown.

If you have multiple Server Blocks, health can only be enabled in one of them (as it is process wide). If you really need multiple endpoints, you must run health endpoints on different ports:

com {
    whoami
    health :8080
}

net {
    erratic
    health :8081
}

Doing this is supported but both endpoints “:8080” and “:8081” will export the exact same health.

Metrics

If monitoring is enabled (via the prometheus plugin) then the following metrics are exported:

  • coredns_health_request_duration_seconds{} - The health plugin performs a self health check once per second on the /health endpoint. This metric is the duration to process that request. As this is a local operation it should be fast. A (large) increase in this duration indicates the CoreDNS process is having trouble keeping up with its query load.
  • coredns_health_request_failures_total{} - The number of times the self health check failed.

Note that these metrics do not have a server label, because being overloaded is a symptom of the running process, not a specific server.

Examples

Run another health endpoint on http://localhost:8091.

. {
    health localhost:8091
}

Set a lame duck duration of 1 second:

. {
    health localhost:8092 {
        lameduck 1s
    }
}