Skip to content

Commit

Permalink
documentation updates for upcoming release
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanejohnson committed Apr 11, 2022
1 parent dc3d786 commit 04f958c
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 4 deletions.
14 changes: 14 additions & 0 deletions docs/content/feature/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)


12 changes: 12 additions & 0 deletions docs/content/ref/metrics.dogstatsd.addr.md
Original file line number Diff line number Diff line change
@@ -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 =
4 changes: 3 additions & 1 deletion docs/content/ref/metrics.names.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
9 changes: 9 additions & 0 deletions docs/content/ref/metrics.prometheus.buckets.md
Original file line number Diff line number Diff line change
@@ -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`
8 changes: 8 additions & 0 deletions docs/content/ref/metrics.prometheus.path.md
Original file line number Diff line number Diff line change
@@ -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/`
9 changes: 9 additions & 0 deletions docs/content/ref/metrics.prometheus.subsystem.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion docs/content/ref/metrics.statsd.addr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 11 additions & 2 deletions docs/content/ref/metrics.target.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ Possible values are:
* `<empty>`: 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.
2 changes: 2 additions & 0 deletions docs/content/ref/proxy.addr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/content/ref/proxy.idleconntimeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
`proxy.idleconntimeout` configures idle connection timeout, which influences
when to close keep-alive connections.

The default is

proxy.idleconntimeout = 15s
8 changes: 8 additions & 0 deletions fabio.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down

0 comments on commit 04f958c

Please sign in to comment.