Skip to content

Router - document published metrics #5699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2018
Merged

Conversation

pecameron
Copy link

OCP 3.6

Documents metrics that are published by the router
Document installation and configuration
Document related environment variables

Trello:
https://trello.com/c/EHq8dqNj/529-document-the-metrics-the-router-exposes

@pecameron
Copy link
Author

@knobunc @mburke5678 @bfallonf PTAL

@pecameron
Copy link
Author

Just squashed the early commit.

provide no router metrics at all.

Prometheus format data is the default data format for metrics in {product-title}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need to say this.

Or can we integrate it with the previous paragraph.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped line

=== HAProxy Template Router Metrics

The HAProxy router, by default, exposes or publishes metrics in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"by default"

Not sure if we want to say that... why not drop it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

Prometheus format data is the default data format for metrics in {product-title}.

The metrics are scraped from the the router controller and from HAProxy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The metrics are from both the router controller, and contain the statistics retrieved from the HAProxy that the router controls.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole paragraph feels like it should be combined with the one that is two below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworded

The metrics are scraped from the the router controller and from HAProxy.

The router scrapes the following HAProxy metrics every 5 seconds. To reduce resource usage when there are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/scrapes/gathers/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole paragraph feels like it should be combined with the one that is two below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reorganized discussion

more than 500 servers, the backends are reported instead of the servers.

The router metrics start at zero when the router is deployed. The HAProxy metrics are reset to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/metrics/counters/?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

The following HAProxy metrics are scraped on a preiodic basis and converted to Prometheus format.
For every frontend the "F" counters are scraped. When the total number of servers is less than
the Server Threshold, the "b" counters are scraped for each backend and the "S" server counters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server Threshold (default 500)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

|===

Column 3 - the counter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization across these descriptions

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@mburke5678
Copy link
Contributor

@pecameron Overall, this looks good. A nice addition.

We have some information on HAProxy router and template routers that appears to have been added in 3.6. We could probably combine with your doc.
https://docs.openshift.com/container-platform/3.6/architecture/networking/routes.html#routes-template-routers

I came across this blog from @cpitman about creating a GUI for the HAProxy router metrics (which I haven't gotten to work yet; but I am sure that it is just me). Is this applicable for 3.6 and something we want to advertise in the official docs?
https://docs.openshift.com/container-platform/3.6/architecture/networking/routes.html#routes-template-routers

@pecameron
Copy link
Author

@gaurav-nelson @mburke5678 @knobunc PTAL

Or, optionally, use the `--metrics-image` option to override the HAProxy
defaults:
+
metrics are automatically available in prometheus format on the stats-port, default 1936. To suppress metrics collection,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/prometheus/Prometheus

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

----
The `--expose-metrics` and `--metrics-image` options are deprecated. The haproxy-exporter
side car is now integrated into the router controller so you can delete the sidecar from existing
router DCs. You can continue to use the side car in existing routers. New routers use the integrated metrics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere we refer to sidecar container and not just sidecar. Is this the same concept? Maybe use sidecar container here?
https://docs.openshift.org/latest/install_config/router/default_haproxy_router.html#exposing-the-router-metrics

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

+


You can extract the raw statistics in prometheus format by using the following.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/prometheis/Prometheus

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

|`ROUTER_LOG_LEVEL` | warning | The log level to send to the syslog server.
|`ROUTER_MAX_CONNECTIONS`| 20000 | Maximum number of concurrent connections.
|`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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/haproxy/haproxy

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you want to change here...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pecameron Sorry. Maybe put the ` characters around haproxy.

@mburke5678
Copy link
Contributor

@pecameron A couple of comments; I can do a follow-up PR for the edits, if you prefer.

@pecameron pecameron force-pushed the metrics branch 2 times, most recently from 03647bd to 4436175 Compare October 19, 2017 15:00
@pecameron
Copy link
Author

@mburke5678 PTAL

@ncbaratta ncbaratta added the peer-review-needed Signifies that the peer review team needs to review this PR label Nov 9, 2017
|http_request_size_bytes|The HTTP request sizes in bytes.
|http_response_size_bytes|The HTTP response sizes in bytes.
|openshift_build_info|A metric with a constant '1' value labeled by major, minor, git commit & git version from which OpenShift was built.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what "from which OpenShift was built." Which cluster??
If using OpenShift, please use {product-title}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git source control software has a version too. This just shows it.

|openshift_build_info|A metric with a constant '1' value labeled by major, minor, git commit & git version from which OpenShift was built.
|ssh_tunnel_open_count|Counter of ssh tunnel total open attempts
|ssh_tunnel_open_fail_count|Counter of ssh tunnel failed open attempts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ssh tunnel/SSH tunnel

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

are, by default, exposed or published in
link:https://prometheus.io/docs/concepts/data_model/[Prometheus format]
for consumption by external metrics collection and aggregation systems (e.g. Prometheus, statsd)..
Metrics are also available dirctly from the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(e.g. Prometheus, statsd)..
Two periods

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

----
The `--expose-metrics` and `--metrics-image` options are deprecated. The haproxy-exporter
side car is now integrated into the router controller so you can delete the sidecar container from existing
router DCs. You can continue to use the side car in existing routers. New routers use the integrated metrics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/router DCs/router deployment configs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@mburke5678
Copy link
Contributor

@pecameron Text looks good. Did you work with @bfallonf to make sure you edited the right topics files? I am not familiar with how they are mapped into other topics. Or, if they still are.

Documents metrics that are published by the router
Document installation and configuration
Document related environment variables

Trello:
https://trello.com/c/EHq8dqNj/529-document-the-metrics-the-router-exposes
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 1, 2017
@pecameron
Copy link
Author

@mburke5678 I made the suggested changes. PTAL

@pecameron
Copy link
Author

@mburke5678 has this information been merged in a different PR?

@pecameron
Copy link
Author

@mburke5678, @mrobson has been looking for the information in our docs.

@mburke5678
Copy link
Contributor

@pecameron I am not sure if you made the changes in the right .adoc files.

@bfallonf Can you look at what Phil did? I think the files he used are yours??

@mburke5678
Copy link
Contributor

@pecameron
@bfallonf says we are good to merge this. What version(s) of OpenShift does this apply to?

@pecameron
Copy link
Author

@mburke5678 @bfallonf - 3.6 and newer

@mburke5678 mburke5678 merged commit dbcbab3 into openshift:master Jan 31, 2018
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
Documents metrics that are published by the router
Document installation and configuration
Document related environment variables

Trello:
https://trello.com/c/EHq8dqNj/529-document-the-metrics-the-router-exposes
(cherry picked from commit 2c23c51) xref:openshift#5699
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
Documents metrics that are published by the router
Document installation and configuration
Document related environment variables

Trello:
https://trello.com/c/EHq8dqNj/529-document-the-metrics-the-router-exposes
(cherry picked from commit 2c23c51) xref:openshift#5699
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
Documents metrics that are published by the router
Document installation and configuration
Document related environment variables

Trello:
https://trello.com/c/EHq8dqNj/529-document-the-metrics-the-router-exposes
(cherry picked from commit 2c23c51) xref:openshift#5699
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
mburke5678 pushed a commit to mburke5678/openshift-docs that referenced this pull request Jan 31, 2018
@mburke5678
Copy link
Contributor

[rev_history]
|xref:../architecture/networking/haproxy-router.adoc#architecture-core-concepts-haproxy-router[Architecture -> HAProxy Router Plug-in]
|New section describing the xref:../architecture/networking/haproxy-router.adoc#haproxy-template-router-metrics[HAProxy Template Router Metrics].
%
|xref:../architecture/networking/routes.adoc#architecture-core-concepts-routes[Architecture -> Routes]
|Added information on the ROUTER_LISTEN_ADDR and ROUTER_METRICS_TYPE variables to the xref:../architecture/networking/routes.adoc#router-environment-variables[Router Environment Variables] section.
%
|xref:../install_config/router/default_haproxy_router.adoc#install-config-router-default-haproxy[Using the Default HAProxy Router]
|Modified some information in the xref:../install_config/router/default_haproxy_router.adoc#exposing-the-router-metrics[Router Environment Variables] section.
%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/dedicated branch/enterprise-3.6 branch/enterprise-3.7 branch/enterprise-3.9 branch/online peer-review-needed Signifies that the peer review team needs to review this PR size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants