From 49cf60340623f413b17b9fc2cc3bbfa14740e032 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Mon, 25 Nov 2019 00:21:20 +0800 Subject: [PATCH 1/3] Change the listening port of `exporter_proxy`. --- cookbooks/prometheus/files/etc/exporter_proxy/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/prometheus/files/etc/exporter_proxy/config.yml b/cookbooks/prometheus/files/etc/exporter_proxy/config.yml index e6daf87..ff1dc71 100644 --- a/cookbooks/prometheus/files/etc/exporter_proxy/config.yml +++ b/cookbooks/prometheus/files/etc/exporter_proxy/config.yml @@ -1,5 +1,5 @@ # listen: Addr and port to listen (required) -listen: "0.0.0.0:9099" +listen: "0.0.0.0:60000" # access_log (optional) access_log: From 23bba10ab00e8310adf0ee0973fdf7e34180d20b Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Mon, 25 Nov 2019 00:22:17 +0800 Subject: [PATCH 2/3] Change the target exporter port number. --- .../files/etc/consul-template.d/prometheus-targets.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/prometheus/files/etc/consul-template.d/prometheus-targets.tmpl b/cookbooks/prometheus/files/etc/consul-template.d/prometheus-targets.tmpl index e75fde3..56232d0 100644 --- a/cookbooks/prometheus/files/etc/consul-template.d/prometheus-targets.tmpl +++ b/cookbooks/prometheus/files/etc/consul-template.d/prometheus-targets.tmpl @@ -1,2 +1,2 @@ - targets:{{range nodes}} - - {{.Address}}:9099{{end}} + - {{.Address}}:60000{{end}} From b11cc232f55894d1ae5b066fcc6e898a81d9dde7 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Mon, 25 Nov 2019 00:23:50 +0800 Subject: [PATCH 3/3] Open port for `exporter_proxy`. --- cookbooks/prometheus/exporter_proxy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/prometheus/exporter_proxy.rb b/cookbooks/prometheus/exporter_proxy.rb index 649560e..129d248 100644 --- a/cookbooks/prometheus/exporter_proxy.rb +++ b/cookbooks/prometheus/exporter_proxy.rb @@ -42,7 +42,7 @@ service 'supervisor' do end # Firewall settings here: -%w( 9099/tcp ).each do |p| +%w( 60000/tcp ).each do |p| execute "ufw allow #{p}" do user 'root'