From 5458369061305b90827c6985993eb00295de1c79 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Mon, 5 Dec 2016 08:53:50 +0000 Subject: [PATCH] Use "address" func when it's possible Change-Id: I8de5b5edcb4a2c78b8fd5d64bb2782ee807f6948 --- service/files/grafana-configure.sh.j2 | 2 +- service/files/heka-elasticsearch.toml.j2 | 2 +- service/files/kibana.yml.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/files/grafana-configure.sh.j2 b/service/files/grafana-configure.sh.j2 index 48ea254..0883a83 100755 --- a/service/files/grafana-configure.sh.j2 +++ b/service/files/grafana-configure.sh.j2 @@ -14,7 +14,7 @@ curl -i -XPOST -H "Accept: application/json" -H "Content-Type: application/json" "type": "influxdb", "access": "proxy", "isDefault": true, - "url": "'"http://{{ influxdb.host }}:{{ influxdb.port.cont }}"'", + "url": "'"{{ address('influxdb', influxdb.port, with_scheme=True) }}"'", "password": "'"{{ influxdb.password }}"'", "user": "'"{{ influxdb.user }}"'", "database": "'"{{ influxdb.database }}"'" diff --git a/service/files/heka-elasticsearch.toml.j2 b/service/files/heka-elasticsearch.toml.j2 index 2d3446d..cab0455 100644 --- a/service/files/heka-elasticsearch.toml.j2 +++ b/service/files/heka-elasticsearch.toml.j2 @@ -6,7 +6,7 @@ fields = ["Timestamp", "Type", "Logger", "Severity", "Payload", "Pid", "Hostname [elasticsearch_output] type = "ElasticSearchOutput" -server = "http://elasticsearch:{{ elasticsearch.port.cont }}" +server = "{{ address('elasticsearch', elasticsearch.port, with_scheme=True) }}" message_matcher = "Type == 'log'" encoder = "elasticsearch_json_encoder" use_buffering = true diff --git a/service/files/kibana.yml.j2 b/service/files/kibana.yml.j2 index 19e5335..3cb118c 100644 --- a/service/files/kibana.yml.j2 +++ b/service/files/kibana.yml.j2 @@ -5,7 +5,7 @@ port: {{ kibana.port.cont }} host: "{{ network_topology["private"]["address"] }}" # The Elasticsearch instance to use for all your queries. -elasticsearch_url: "http://elasticsearch:{{ elasticsearch.port.cont }}" +elasticsearch_url: "{{ address('elasticsearch', elasticsearch.port, with_scheme=True) }}" # preserve_elasticsearch_host true will send the hostname specified in `elasticsearch`. If you set it to false, # then the host you use to connect to *this* Kibana instance will be sent.