Git Product home page Git Product logo

openshift-router-metrics's Introduction

OpenShift Router Metrics

OpenShift by default uses HAProxy to reverse proxy and load balance traffic coming from outside of OpenShift going to one or more pods deployed in OpenShift. HAproxy exposes a statistics web page on port 1936, which a user can login to if they know the HAProxy admin password. Once logged in, a user can see data for all routes exposed by OpenShift.

The stats page provides lots of useful data:

  • What pods the router is currently exposing
  • If any pods are failing router health checks
  • If any or all pods are returning error codes
  • Latency for requests
  • Etc

openshift-router-metrics is an application that exposes HAProxy metrics and integrates with OpenShift for authentication. Users do not need to know the HAProxy admin password, and can use their own credentials for accessing OpenShift. Once logged in, users can only see information on routes that they have access to in OpenShift.

In other words, a cluster administrator can see information for all routes, while a normal user can see data for routes they have access to.

The app also exposes a tenant-aware csv data endpoint, just add ?csv to the end of the url.

Deployment

Prerequisites:

  1. This application communicates with HAProxy to get statistics, which requires port 1936/TCP to be open on all infrastructure nodes. This is good practice anyways, since this is the port that should be used for health checking the routers.

Most of the installation is automated via a OpenShift Template. Download the template [openshift-router-metrics.yaml](https://raw.githubusercontent.com/cpitman/openshift-router-metrics/master/openshift-router-metrics.yaml], and then create the template by running oc create -n openshift -f openshift-router-metrics.yml. Then, using the web ui, choose a project and then click "Add to Project". Select the "openshift-router-metrics" template. The most important parameters that you need to provide are:

  1. The public hostname that this app should be exposed on. This is needed to properly setup OAuth SSO, and should not include a scheme (ie "router-metrics.paas.example.com")
  2. The public master url for accessing the OpenShift Web UI, again needed for OAuth SSO (ie "https://paas-console.example.com:8443")
  3. Disable TLS Certificate verification if you are using a self signed certificate for the public master url

After running the template instructions will be displayed on the screen for running two more commands to provide the app access to the routers and OAuth SSO. Both commands must be executed before the app will properly function.

openshift-router-metrics's People

Contributors

cpitman avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.