diff --git a/build/tag.sh b/build/tag.sh index c6f225263..3a5b9c013 100755 --- a/build/tag.sh +++ b/build/tag.sh @@ -23,5 +23,5 @@ fi sed -i '' -e "s|^var version .*$|var version = \"$v\"|" $basedir/main.go git add $basedir/main.go -git commit -S -m "Release v$v" +git commit -S -m "Release v$v" || true git tag -s v$v -m "Tag v${v}" diff --git a/docs/content/feature/metrics.md b/docs/content/feature/metrics.md index 494134588..6ea97e0d7 100644 --- a/docs/content/feature/metrics.md +++ b/docs/content/feature/metrics.md @@ -11,6 +11,19 @@ to avoid computing large amounts of metrics. The metrics can be send to options in the [fabio.properties](https://github.com/eBay/fabio/blob/master/fabio.properties) file. +### Configuring Prometheus Metrics + +To configure prometheus metrics, you need two do the following: + +1) You must specify that prometheus is the [metrics.target](/ref/metrics.target/) +2) You must configure a listener with [proxy.addr](/ref/proxy.addr/) with `proto=prometheus` +3) (optional) override the +[metrics.prometheus.path](/ref/metrics.prometheus.path/), +[metrics.prometheus.subsystem](/ref/metrics.prometheus.subsystem/), +and [metrics.prometheus.buckets](/ref/metrics.prometheus.buckets/). + +### Metrics info (for non-tagged backends, such as circonus and statsd_raw) + Fabio reports the following metrics: Name | Type | Description @@ -60,3 +73,4 @@ A gauge provides a current value. with the `metrics.names` template defined in [fabio.properties](https://github.com/fabiolb/fabio/blob/master/fabio.properties) + diff --git a/docs/content/ref/metrics.dogstatsd.addr.md b/docs/content/ref/metrics.dogstatsd.addr.md new file mode 100644 index 000000000..4bd4ee5eb --- /dev/null +++ b/docs/content/ref/metrics.dogstatsd.addr.md @@ -0,0 +1,12 @@ +--- +title: "metrics.dogstatsd.addr" +--- + +`metrics.dogstatsd.addr` configures the host:port of the dogstatsd +server. + +This is required when [metrics.target](/ref/metrics.target/) is set to `dogstatsd`. + +The default is + + metrics.statsd.addr = diff --git a/docs/content/ref/metrics.names.md b/docs/content/ref/metrics.names.md index 857a4ee85..8e188ef28 100644 --- a/docs/content/ref/metrics.names.md +++ b/docs/content/ref/metrics.names.md @@ -2,7 +2,9 @@ title: "metrics.names" --- -`metrics.names` configures the template for the route metric names. +`metrics.names` configures the template for the route metric names +on backends that don't support tags. This is used in circonus, +graphite and statsd_raw. dogstatsd and prometheus ignore this. The value is expanded by the [text/template](https://golang.org/pkg/text/template) package and provides the following variables: diff --git a/docs/content/ref/metrics.prometheus.buckets.md b/docs/content/ref/metrics.prometheus.buckets.md new file mode 100644 index 000000000..69baacce6 --- /dev/null +++ b/docs/content/ref/metrics.prometheus.buckets.md @@ -0,0 +1,9 @@ +--- +title: "metrics.prometheus.buckets" +--- + +`metrics.prometheus.buckets` configures the time buckets for use with histograms, measured in seconds. +for instance, .005 is equivalent to 5ms. There is an implied "infinity" bucket tacked on at the end. + +The default is +`metrics.prometheus.buckets = .005,.01,.025,.05,.1,.25,.5,1,2.5,5,10` diff --git a/docs/content/ref/metrics.prometheus.path.md b/docs/content/ref/metrics.prometheus.path.md new file mode 100644 index 000000000..7e9289860 --- /dev/null +++ b/docs/content/ref/metrics.prometheus.path.md @@ -0,0 +1,8 @@ +--- +title: "metrics.prometheus.path" +--- + +`metrics.prometheus.path` configures the path to serve up metrics on any configured +[proxy.addr](/ref/proxy.addr/) where `proto=prometheus`. + +Defaults to `/metrics/` diff --git a/docs/content/ref/metrics.prometheus.subsystem.md b/docs/content/ref/metrics.prometheus.subsystem.md new file mode 100644 index 000000000..5f6bbd1c2 --- /dev/null +++ b/docs/content/ref/metrics.prometheus.subsystem.md @@ -0,0 +1,9 @@ +--- +title: "metrics.prometheus.subsystem" +--- + +`metrics.prometheus.subsystem` configures the subsystem name when reporting +metrics. This is basically appended to the prefix for metric names. + +See https://prometheus.io/docs/practices/instrumentation/#subsystems +for more information. diff --git a/docs/content/ref/metrics.statsd.addr.md b/docs/content/ref/metrics.statsd.addr.md index b33e3e1e0..e54edbee8 100644 --- a/docs/content/ref/metrics.statsd.addr.md +++ b/docs/content/ref/metrics.statsd.addr.md @@ -5,7 +5,7 @@ title: "metrics.statsd.addr" `metrics.statsd.addr` configures the host:port of the StatsD server. -This is required when [metrics.target](/ref/metrics.target/) is set to `statsd`. +This is required when [metrics.target](/ref/metrics.target/) is set to `statsd_raw`. The default is diff --git a/docs/content/ref/metrics.target.md b/docs/content/ref/metrics.target.md index 4b4c5231f..6d5099bf8 100644 --- a/docs/content/ref/metrics.target.md +++ b/docs/content/ref/metrics.target.md @@ -9,9 +9,18 @@ Possible values are: * ``: do not report metrics * `stdout`: report metrics to stdout * `graphite`: report metrics to Graphite on [metrics.graphite.addr](/ref/metrics.graphite.addr/) -* `statsd`: report metrics to StatsD on [metrics.statsd.addr](/ref/metrics.statsd.addr/) -* `circonus`: report metrics to Circonus (http://circonus.com/) +* `statsd`: legacy statsd support, used in v1.5.5 and lower - removed in v1.6 +* `statsd_raw`: report metrics to StatsD on [metrics.statsd.addr](/ref/metrics.statsd.addr/) - this was + intentionally renamed because anyone upgrading to 1.6 will need to revisit their configuration anyway due to + rewrite of this backend. It was quite broken before, the counters never reset, it did not follow the spec so the info was + likely wrong or people using this were doing some workarounds they'll need to remove anyway. +* `circonus`: report metrics to Circonus (https://circonus.com/) +* `prometheus`: use prometheus metrics. (https://prometheus.io) Must be used in conjuction with a prometheus + listener in [proxy.addr](/ref/proxy.addr/]) +* `dogstatsd`: use with datadog dogstatsd (https://www.datadoghq.com/) The default is metrics.target = + +Multiple metrics targets can be defined separated by comma. diff --git a/docs/content/ref/proxy.addr.md b/docs/content/ref/proxy.addr.md index a3f50649f..dfa732d31 100644 --- a/docs/content/ref/proxy.addr.md +++ b/docs/content/ref/proxy.addr.md @@ -24,6 +24,8 @@ The supported protocols are: * `tcp+sni` for an SNI aware TCP proxy * `tcp-dynamic` for a consul driven TCP proxy * `https+tcp+sni` for an SNI aware TCP proxy with https fallthrough +* `prometheus` for a prometheus metrics endpoint. Used in conjunction with [metrics.target](/ref/metrics.target/) + =prometheus If no `proto` option is specified then the protocol is either `http` or `https` depending on whether a diff --git a/docs/content/ref/proxy.idleconntimeout.md b/docs/content/ref/proxy.idleconntimeout.md new file mode 100644 index 000000000..8b113104f --- /dev/null +++ b/docs/content/ref/proxy.idleconntimeout.md @@ -0,0 +1,6 @@ +`proxy.idleconntimeout` configures idle connection timeout, which influences +when to close keep-alive connections. + +The default is + + proxy.idleconntimeout = 15s diff --git a/fabio.properties b/fabio.properties index 832014533..5364045d7 100644 --- a/fabio.properties +++ b/fabio.properties @@ -375,6 +375,14 @@ # proxy.keepalivetimeout = 0s +# proxy.idleconntimeout configures the idle connection timeout, when +# to close (keep-alive) connections +# +# The default is +# +# proxy.idleconntimeout = 15s + + # proxy.dialtimeout configures the connection timeout for # outgoing connections. #