From 45c1fd1950205242804ca55e797e6c1aafabd98e Mon Sep 17 00:00:00 2001 From: Aleksey Shirokih Date: Fri, 30 Jun 2017 00:03:42 +0300 Subject: [PATCH] Change default prometheus_client port (#2973) --- CHANGELOG.md | 2 ++ etc/telegraf.conf | 2 +- plugins/outputs/prometheus_client/README.md | 2 +- plugins/outputs/prometheus_client/prometheus_client.go | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 551c1a544..c2b8ced28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - In the `aerospike` input the `node_name` field has been changed to be a tag for both the `aerospike_node` and `aerospike_namespace` measurements. +- **breaking change** Change default prometheus_client port to 9273. To play well with Prometheus [port-allocations](https://github.com/prometheus/prometheus/wiki/Default-port-allocations) + ### New Plugins - [fail2ban](./plugins/inputs/fail2ban/README.md) diff --git a/etc/telegraf.conf b/etc/telegraf.conf index a02c6a12f..b7999b3e0 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -505,7 +505,7 @@ # # Configuration for the Prometheus client to spawn # [[outputs.prometheus_client]] # ## Address to listen on -# # listen = ":9126" +# # listen = ":9273" # # ## Interval to expire metrics and not deliver to prometheus, 0 == no expiration # # expiration_interval = "60s" diff --git a/plugins/outputs/prometheus_client/README.md b/plugins/outputs/prometheus_client/README.md index b9177ed7f..4ec7eee3f 100644 --- a/plugins/outputs/prometheus_client/README.md +++ b/plugins/outputs/prometheus_client/README.md @@ -8,7 +8,7 @@ This plugin starts a [Prometheus](https://prometheus.io/) Client, it exposes all # Publish all metrics to /metrics for Prometheus to scrape [[outputs.prometheus_client]] # Address to listen on - listen = ":9126" + listen = ":9273" # Expiration interval for each metric. 0 == no expiration expiration_interval = "60s" diff --git a/plugins/outputs/prometheus_client/prometheus_client.go b/plugins/outputs/prometheus_client/prometheus_client.go index b52dcff6d..f16824c9e 100644 --- a/plugins/outputs/prometheus_client/prometheus_client.go +++ b/plugins/outputs/prometheus_client/prometheus_client.go @@ -57,7 +57,7 @@ type PrometheusClient struct { var sampleConfig = ` ## Address to listen on - # listen = ":9126" + # listen = ":9273" ## Interval to expire metrics and not deliver to prometheus, 0 == no expiration # expiration_interval = "60s" @@ -67,7 +67,7 @@ func (p *PrometheusClient) Start() error { prometheus.Register(p) if p.Listen == "" { - p.Listen = "localhost:9126" + p.Listen = "localhost:9273" } mux := http.NewServeMux()