Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_haproxy_backend

Rating
2 votes
Favoured:
0
Current Version
0.1
Last Release Date
2013-02-28
Compatible With
  • Nagios 3.x
  • Nagios XI
License
BSD
Hits
44898
Files:
FileDescription
check_haproxy_backendcheck_haproxy_backend

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

A quick hack to help us monitor the backends behind our haproxy setup
Usage:
check_haproxy_backend -H haproxyserver -x backend

No error checking done in the script.

Expects that the follwing has been added to haproxy.cfg, but username, password, port, and uri can be provided as parameters:
listen stats 0.0.0.0:8000
mode http
stats enable
stats uri /haproxy
stats realm HAProxy
stats auth hauser:hapasswd

Should be easily understandable and modifiable.
Reviews (1)
This works well espexially because it has perf data.
I only had to change a minor thing becaus eit matched the wrong line due to matching grep.

if you grep "something" it would match "not-something" as well.
so i changed:
my @line = grep(/$proxy,BACKEND,/, @csv);

to:
my @line = grep(/^$proxy,BACKEND,/, @csv);

regards,

Peter