Java library to poll statistics from HAProxy instances and give back a formatted JSON file to use in another applications.
- Configurable with a YAML file.
- Give back a JSON with some data in it.
<dependency>
<groupId>com.peopledoc</groupId>
<artifactId>haproxy-stats</artifactId>
<version>1.3.2</version>
</dependency>
com.peopledoc.haproxystats.HAProxyChecker
to check HAProxy stats.com.peopledoc.statsretriever.StatsRetriever
to collect results from multiple servers providing results fromHAProxyChecker
.
For com.peopledoc.haproxystats.HAProxyChecker
:
environment: env-name
# HAProxy instances list
loadbalancers:
- name: haproxy1
url: http://haproxy1.example.com
username: userA
password: pass
# optional whitelist of proxies
proxies:
- app1
- app2
For com.peopledoc.statsretriever.StatsRetriever
:
integration: https://integration.example.com
test: https://test.example.com
{
"test" : [ {
"name" : "app1",
"backends" : [ {
"name" : "app1-A",
"weight" : 0,
"available" : true,
"status" : "DISABLED"
}, {
"name" : "app1-B",
"weight" : 100,
"available" : true,
"status" : "OK"
} ],
"loadbalancer" : "haproxy1"
} ]
}
Apache License v2.0 - © 2018 PeopleDoc