This is a cache of https://docs.openshift.com/enterprise/3.0/admin_guide/router.html. It is a snapshot of the page at 2024-11-21T04:38:40.303+0000.
Monitoring Routers | Administration | OpenShift Enterprise 3.0
×

Overview

Depending on the underlying implementation, you can monitor a running router in multiple ways. This topic discusses the haproxy template router and the components to check to ensure its health.

Viewing Statistics

The haproxy router exposes a web listener for the haproxy statistics. Enter the router’s public IP address and the correctly configured port (1936 by default) to view the statistics page, and enter the administrator password when prompted. This password and port are configured during the router installation, but they can be found by viewing the haproxy.conf file on the container.

Viewing Logs

To view a router log, run the oc log command on the pod. Since the router is running as a plug-in process that manages the underlying implementation, the log is for the plug-in, not the actual haproxy log.

Viewing the Router Internals

routes.json

Routes are processed by the haproxy router, and are stored both in memory, on disk, and in the haproxy configuration file. The internal route representation, which is passed to the template to generate the haproxy configuration file, is found in the /var/lib/containers/router/routes.json file. When troubleshooting a routing issue, view this file to see the data being used to drive configuration.

haproxy configuration

You can find the haproxy configuration and the backends that have been created for specific routes in the /var/lib/haproxy/conf/haproxy.conf file. The mapping files are found in the same directory. The helper frontend and backends use mapping files when mapping incoming requests to a backend.

Certificates

Certificates are stored in two places:

  • Certificates for edge terminated and re-encrypt terminated routes are stored in the /var/lib/containers/router/certs directory.

  • Certificates that are used for connecting to backends for re-encrypt terminated routes are stored in the /var/lib/containers/router/cacerts directory.

The files are keyed by the namespace and name of the route. The key, certificate, and CA certificate are concatenated into a single file. You can use OpenSSL to view the contents of these files.