Change default prometheus_client port (#2973)

This commit is contained in:
Aleksey Shirokih 2017-06-30 00:03:42 +03:00 committed by Daniel Nelson
parent daecb88808
commit 45c1fd1950
4 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,8 @@
- In the `aerospike` input the `node_name` field has been changed to be a tag - In the `aerospike` input the `node_name` field has been changed to be a tag
for both the `aerospike_node` and `aerospike_namespace` measurements. 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 ### New Plugins
- [fail2ban](./plugins/inputs/fail2ban/README.md) - [fail2ban](./plugins/inputs/fail2ban/README.md)

View File

@ -505,7 +505,7 @@
# # Configuration for the Prometheus client to spawn # # Configuration for the Prometheus client to spawn
# [[outputs.prometheus_client]] # [[outputs.prometheus_client]]
# ## Address to listen on # ## Address to listen on
# # listen = ":9126" # # listen = ":9273"
# #
# ## Interval to expire metrics and not deliver to prometheus, 0 == no expiration # ## Interval to expire metrics and not deliver to prometheus, 0 == no expiration
# # expiration_interval = "60s" # # expiration_interval = "60s"

View File

@ -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 # Publish all metrics to /metrics for Prometheus to scrape
[[outputs.prometheus_client]] [[outputs.prometheus_client]]
# Address to listen on # Address to listen on
listen = ":9126" listen = ":9273"
# Expiration interval for each metric. 0 == no expiration # Expiration interval for each metric. 0 == no expiration
expiration_interval = "60s" expiration_interval = "60s"

View File

@ -57,7 +57,7 @@ type PrometheusClient struct {
var sampleConfig = ` var sampleConfig = `
## Address to listen on ## Address to listen on
# listen = ":9126" # listen = ":9273"
## Interval to expire metrics and not deliver to prometheus, 0 == no expiration ## Interval to expire metrics and not deliver to prometheus, 0 == no expiration
# expiration_interval = "60s" # expiration_interval = "60s"
@ -67,7 +67,7 @@ func (p *PrometheusClient) Start() error {
prometheus.Register(p) prometheus.Register(p)
if p.Listen == "" { if p.Listen == "" {
p.Listen = "localhost:9126" p.Listen = "localhost:9273"
} }
mux := http.NewServeMux() mux := http.NewServeMux()