This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# | |
#This polls multiple haproxy servers via their admin stats urls and sums up statistics. | |
#Scenario for usage is when you have multiple HaProxy boxes behind a load balancer and want to view the | |
# "sum total" of some key statistics like Bytes In/Out, Sessions etc across all HAProxy servers. | |
#Usage: Assuming you want to sum up stats across ha proxies lb1,2 and 3 which are have stats available via http://lbname:8080/statspath. | |
# /etc/nagios3/scripts/check_haproxy_all.pl -u lb1.domain.com,lb2.domain.com,lb3.domain.com -U admin -a '/statspath' -P 'PASSWORD' | |
# See http://www.onepwr.org/haproxy-consolidated-stats for detailed info. | |
use strict; # always! :) |