Skip to content
Savan Patel edited this page Mar 27, 2016 · 3 revisions

Welcome to the ha-analyzer wiki!

ha-analyzer

Parses and mines haproxy logs and stores to mysql where it can be used to analyze performance.

setting up

mysql database and table

  • Copy commands from ha-analyzer.cfg and in config folder to create mysql database and table.
  • Create user with password that has read write access to this database and table.

python version

  • Supported python version : 2.7
  • This has been tested on python 2.7 on ubuntu 14.04 LTS.

python prerequisites

  • logging : sudo pip install logging
  • subprocess : sudo pip install subprocess
  • re : sudo pip install re

Linux utils

  • mysql-connector-python : sudo apt-get install mysql-connector-python

ha-analyzer configs:

  • please setup ha-analyzer config file as per your requirement. Sample config file is in config/ folder(self explanatory)

haproxy setup

  • make sure that haproxy is configured properly where you get the logs like Mar 27 12:50:02 localhost haproxy[1346]: 127.0.0.1:41383 [27/Mar/2016:12:50:00.205] http-in hello/localserver 1825/0/0/13/1838 200 151 - - ---- 2/2/0/0/0 0/0 "GET /hello HTTP/1.1"

running ha-analyzer

start ha-analyzer

  • ./ha-analyzer.py <configfile> or ptyhon ha-analyzer.py <configfile>

stop ha-analyzer

  • ./shutdown.py or python shutdown.py

to-dos

  • Build node js service for dashboard and UI.