How to view openshift router (haproxy) stats

After you have installed your fancy openshift install and that it kicked the haproxy router automatically after install you may want to see the stats of the router.

The HAproxy stats are exposed on the port 1936 where the router is located (usually on the master node) so first you need a way to access it. You can open it via your firewall (not ideal) or you can just port forward the port to your workstation via SSH :

$ ssh -L 1936:localhost:1936 master.openshift

Now that it’s done and you have 1936 tunelled you need to figure out the password of the haproxy stats. It’s stored in its environment variables so you just do a oc describe to see it for example :

2016-09-27__12-58-57-15400

Now that you have the password (uo5LtC6mac in my case), you just point your workstation web browser to :

http://admin:password@localhost:1936

just make sure to replace the password with your own password and you should be all set.

2016-09-27__13-01-20-4942

Share on FacebookTweet about this on TwitterShare on Google+Print this pageEmail this to someone
  • Srinivas Kotaru

    very good. Keep writing such useful tips and articles. very useful for platform operators, like us

    Srinivas Kotaru