Skip to content

jpfuentes2/haps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Examples

Client

The client connects to the HAProxy stats socket via the haproxy-ruby gem and pushes the information to the aggregator server.

HAPS::Client.configure do |c|
  c.ssl true
  c.ssl_private_key "certs/cert.key",
  c.ssl_cert_chain "certs/cert.crt"
  c.haproxy_socket "/tmp/haproxy/haproxy.sock"
end

HAPS::Client.start "127.0.0.1", 10001

Server

The server is an event-machine TCP/IP which proxies data to an array of listenters. The listeners below will push stats/data into redis and log connection info.

HAPS::Server.configure do |c|
  c.ssl true
  c.ssl_private_key "certs/cert.key"
  c.ssl_cert_chain "certs/cert.crt"
  c.ssl_verify_peer true

  c.use HAPS::Server::Listeners::LoggerListener, STDOUT
  c.use HAPS::Server::Listeners::RedisListener, ENV['REDIS_URL']
end

HAPS::Server.start "127.0.0.1", 10001

About

What's the HAPS? It is an HAProxy stats aggregator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages