mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 10:13:14 -05:00
Allow debug queries to etcd middleware (#150)
With this you can retreive the raw data that the etcd middleware used to create the reply. The debug data is put in TXT records that are stuffed in the CH classs. This is only enabled if you specify `debug` in the etcd stanza. You can retrieve it by prefixing your query with 'o-o.debug.' For instance: ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost -p 1053 SRV o-o.debug.production.*.skydns.local ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47798 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;o-o.debug.production.*.skydns.local. IN SRV ;; ANSWER SECTION: production.*.skydns.local. 154 IN SRV 10 50 8080 service1.example.com. production.*.skydns.local. 154 IN SRV 10 50 8080 service2.example.com. ;; ADDITIONAL SECTION: skydns.local.skydns.east.production.rails.1. 154 CH TXT "service1.example.com:8080(10,0,,false)[0,]" skydns.local.skydns.west.production.rails.2. 154 CH TXT "service2.example.com:8080(10,0,,false)[0,]"
This commit is contained in:
@@ -27,6 +27,7 @@ etcd [zones...] {
|
||||
endpoint endpoint...
|
||||
upstream address...
|
||||
tls cert key cacert
|
||||
debug
|
||||
}
|
||||
~~~
|
||||
|
||||
@@ -38,6 +39,13 @@ etcd [zones...] {
|
||||
pointing to external names. If you want CoreDNS to act as a proxy for clients you'll need to add
|
||||
the proxy middleware.
|
||||
* `tls` followed the cert, key and the CA's cert filenames.
|
||||
* `debug` allow debug queries. Prefix the name with `o-o.debug.` to reveive extra information in the
|
||||
additional section of the reply in the form of text records:
|
||||
|
||||
skydns.test.skydns.dom.a. 300 CH TXT "127.0.0.1:0(10,0,,false)[0,]"
|
||||
|
||||
This shows the complete key as the owername, the rdata of the TXT record has:
|
||||
`host:port(priority,weight,txt content,mail)[targetstrip,group]`.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user