{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/356","labels_url":"https://api.github.com/repos/hashicorp/consul-template/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/issues/356/comments","events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/356/events","html_url":"https://github.com/hashicorp/consul-template/issues/356","id":100194015,"number":356,"title":"Issue with services that include dot on the name ","user":{"login":"bernardeli","id":28157,"avatar_url":"https://avatars.githubusercontent.com/u/28157?v=3","gravatar_id":"","url":"https://api.github.com/users/bernardeli","html_url":"https://github.com/bernardeli","followers_url":"https://api.github.com/users/bernardeli/followers","following_url":"https://api.github.com/users/bernardeli/following{/other_user}","gists_url":"https://api.github.com/users/bernardeli/gists{/gist_id}","starred_url":"https://api.github.com/users/bernardeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bernardeli/subscriptions","organizations_url":"https://api.github.com/users/bernardeli/orgs","repos_url":"https://api.github.com/users/bernardeli/repos","events_url":"https://api.github.com/users/bernardeli/events{/privacy}","received_events_url":"https://api.github.com/users/bernardeli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-10T23:58:31Z","updated_at":"2015-08-10T23:58:31Z","closed_at":null,"body":"Hi,\r\n\r\nI had a setup with consul + consul-template + nginx working fine, until launching services with dots.\r\n\r\nSee below the current setup:\r\n\r\n### Consul\r\n\r\n```\r\ncurl $CONSUL_URL/v1/catalog/services | jq .\r\n{\r\n  \"consul\": [],\r\n  \"projector.nginx-v13\": [],\r\n  \"web.nginx-v13\": [],\r\n  \"worker.nginx-v13\": []\r\n}\r\n\r\ncurl $CONSUL_URL/v1/catalog/service/web.nginx-v13 | jq .\r\n[\r\n  {\r\n    \"Node\": \"staging-b-slave\",\r\n    \"Address\": \"10.75.95.48\",\r\n    \"ServiceID\": \"consul:10.75.95.48:web.nginx-v13:31941\",\r\n    \"ServiceName\": \"web.nginx-v13\",\r\n    \"ServiceTags\": null,\r\n    \"ServiceAddress\": \"10.75.95.48\",\r\n    \"ServicePort\": 31941\r\n  },\r\n  {\r\n    \"Node\": \"staging-a-slave\",\r\n    \"Address\": \"10.75.91.11\",\r\n    \"ServiceID\": \"consul:10.75.91.11:web.nginx-v13:31331\",\r\n    \"ServiceName\": \"web.nginx-v13\",\r\n    \"ServiceTags\": null,\r\n    \"ServiceAddress\": \"10.75.91.11\",\r\n    \"ServicePort\": 31331\r\n  }\r\n]\r\n```\r\n\r\n### Consul Template\r\n\r\n#### With `range services`, and then `range service .Name`:\r\n\r\n```\r\n{{ range services }}\r\n# {{ .Name }}\r\n{{ range service .Name }}-> Found: {{.Address}}.\r\n{{ else }}-> Empty!\r\n{{ end }}\r\n{{ end }}\r\n```\r\n\r\nOutput:\r\n```\r\n# consul\r\n-> Found: 10.75.91.11.\r\n-> Found: 10.75.95.0.\r\n-> Found: 10.75.95.48.\r\n\r\n# web.nginx-v13\r\n-> Empty!\r\n```\r\n\r\n#### With `service \"consul\"` and `service \"web.nginx-v13\"`:\r\n\r\n```\r\n# consul\r\n{{ range service \"consul\" }}-> Found: {{.Address}}.\r\n{{ end }}\r\n# web.nginx-v13\r\n{{ range service \"web.nginx-v13\" }}-> Found: {{.Address}}.\r\n{{ else }}-> Empty!\r\n{{ end }}\r\n```\r\n\r\nOutput:\r\n```\r\n# Consul\r\n-> Found: 10.75.91.11.\r\n-> Found: 10.75.95.0.\r\n-> Found: 10.75.95.48.\r\n\r\n# web.nginx-v13\r\n-> Empty!\r\n```\r\n\r\nRunning that with: `consul-template -consul $CONSUL_URL -template default.conf.ctmpl -dry -once`\r\n\r\nConsul-template version: v0.10.0\r\nConsul version: v0.5.2\r\n\r\nI've spent few hours trying different things but none helped. \r\n\r\nAny obvious mistake I'm making? I was hoping someone can shed some light for me.\r\n\r\nThanks"}}