Skip to content

Commit

Permalink
Change default prometheus_client port (#2973)
Browse files Browse the repository at this point in the history
  • Loading branch information
freeseacher authored and danielnelson committed Jun 29, 2017
1 parent daecb88 commit 45c1fd1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion etc/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion plugins/outputs/prometheus_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions plugins/outputs/prometheus_client/prometheus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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()
Expand Down

0 comments on commit 45c1fd1

Please sign in to comment.