-
Notifications
You must be signed in to change notification settings - Fork 672
Open
Labels
Description
According to the docs Logspout should look for a route address's DNS SRV records to figure out which ports to hit:
but you can also specify a name that resolves via DNS to one or more SRV records. That means this works great with Consul for service discovery.
This is not working in practice. Attempting to add a route using the example in the routesapi doc (which uses a format like loggregator.service.consul) simply results in an error: Bad route: missing port in address
Here's the actual API call I'm making:
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H -d '{
"adapter": "syslog",
"address": "logstash.service.consul"
}' "http://localhost:8000/routes"
And here's the response from dig (inside the container) showing valid DNS records being returned (including SRV):
dig srv logstash.service.consul
; <<>> DiG 9.10.4-P6 <<>> srv logstash.service.consul
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2353
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 3
;; QUESTION SECTION:
;logstash.service.consul. IN SRV
;; ANSWER SECTION:
logstash.service.consul. 0 IN SRV 1 1 31942 10.173.144.84.node.default.consul.
logstash.service.consul. 0 IN SRV 1 1 31008 10.173.144.128.node.default.consul.
logstash.service.consul. 0 IN SRV 1 1 31501 10.173.144.115.node.default.consul.
;; ADDITIONAL SECTION:
10.173.144.84.node.default.consul. 0 IN A 10.173.144.84
10.173.144.128.node.default.consul. 0 IN A 10.173.144.128
10.173.144.115.node.default.consul. 0 IN A 10.173.144.115
;; Query time: 2 msec
;; SERVER: 172.17.0.1#53(172.17.0.1)
;; WHEN: Sat Feb 25 21:10:20 UTC 2017
;; MSG SIZE rcvd: 224