Skip to content

Commit

Permalink
Merge pull request openshift#8368 from bmcelvee/BZ1542724
Browse files Browse the repository at this point in the history
Bug 1542724 Add additional router metrics env var to docs
  • Loading branch information
bmcelvee authored May 14, 2018
2 parents 36717bb + af60357 commit 027c273
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
26 changes: 15 additions & 11 deletions architecture/topics/haproxy_template_router.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,25 @@ to provide
link:https://cbonte.github.io/haproxy-dconv/1.5/configuration.html#9[HAProxy CSV format] metrics, or
provide no router metrics at all.

The metrics are collected from both the router controller and from HAProxy every 5 seconds.
The router metrics counters start at zero when the router is deployed and increase over time.
The HAProxy metrics counters are reset to zero every time haproxy is reloaded. The router
collects HAProxy statistics for each frontend, backend and server. To reduce resource usage
when there are more than 500 servers, the backends are reported instead of the servers since
a backend can have multiple servers.
The metrics are collected from both the router controller and from HAProxy every
5 seconds. The router metrics counters start at zero when the router is deployed
and increase over time. The HAProxy metrics counters are reset to zero every
time haproxy is reloaded. The router collects HAProxy statistics for each
frontend, backend and server. To reduce resource usage when there are more than
500 servers, the backends are reported instead of the servers since a backend
can have multiple servers.

The statistics are a subset of the available HAProxy
link:https://cbonte.github.io/haproxy-dconv/1.5/configuration.html#9.1[Statistics].

The following HAProxy metrics are collected on a preiodic basis and converted to Prometheus
format. For every frontend the "F" counters are collected. When the total number of servers
is less than the Server Threshold (default 500), the "b" counters are collected for each
backend and the "S" server counters are collected for each server. Otherwise, the "B"
counters are collected for each backend and no server counters are collected.
The following HAProxy metrics are collected on a periodic basis and converted to
Prometheus format. For every frontend the "F" counters are collected. When the
counters are collected for each backend and the "S" server counters are
collected for each server. Otherwise, the "B" counters are collected for each
backend and no server counters are collected.

See xref:../../architecture/networking/routes.adoc#env-variables[router environment variables]
for more information.

In the following table:

Expand Down
4 changes: 4 additions & 0 deletions architecture/topics/router_environment_variables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ will "linger" around for that period. xref:time-units[(TimeUnits)]
|`ROUTER_LISTEN_ADDR`| 0.0.0.0:1936 | Sets the listening address for xref:../../install_config/router/default_haproxy_router.adoc#exposing-the-router-metrics[router metrics].
|`ROUTER_LOG_LEVEL` | warning | The log level to send to the syslog server.
|`ROUTER_MAX_CONNECTIONS`| 20000 | Maximum number of concurrent connections.
|`ROUTER_METRICS_HAPROXY_SERVER_THRESHOLD`| 500 |
|`ROUTER_METRICS_HAPROXY_EXPORTED`| | Metrics collected in CSV format. For example, `defaultSelectedMetrics` = []int{2, 4, 5, 7, 8, 9, 13, 14, 17, 21, 24, 33, 35, 40, 43, 60}
|`ROUTER_METRICS_HAPROXY_BASE_SCRAPE_INTERVAL`| 5s |
|`ROUTER_METRICS_HAPROXY_TIMEOUT`| 5s |
|`ROUTER_METRICS_TYPE`| haproxy | Generate metrics for xref:../../install_config/router/default_haproxy_router.adoc#exposing-the-router-metrics[the HAProxy router]. (haproxy is the only supported value)
|`ROUTER_OVERRIDE_HOSTNAME`| | If set `true`, override the spec.host value for a route with the template in `ROUTER_SUBDOMAIN`.
|`ROUTER_SERVICE_HTTPS_PORT` | 443 | Port to listen for HTTPS requests.
Expand Down

0 comments on commit 027c273

Please sign in to comment.