I committed a new Munin-plugin for HAProxy. It’s a multigraph plugin, it discovers all the configured frontends and backends automatically – all you need to provide is the username/password for the haproxy status page.
It produces 8 graphs, + subgraphs for some of the backends, where it presents the same graphs, but with server-specific metrics.
Some of the root-graphs:
Do you use HAProxy and Munin? Check it out!








Looks great! I’m about to give this plugin a try, would be perfect if it supported unix socket. =)
Thanks
I’ll see if I can get around and patch it with unix-socket support.
Excellent plugin! Thumbs up… I’ve just configured it on my haproxy, looking forward to seeing graphs tomorrow morning when they collect more data.
Tnx for sharing!
When I do munin-run haproxy_ng, it shows values and stuff, but when munin runs its cron, graphs do not update – they stay with ‘nan’.
I’ve checked permissions and they are fine.
Come by on IRC, and I’ll help you debug?
I’ve sorted that out.
Editor joe and it’s autoindent and line wrap messed up the source code of plugin. After downloading the plugin with wget – graphs are drawn OK.
Great plugin,
Sorry I am new in munin, buy when i try to configure it I got this error:
2012/05/17-21:59:00 [17147] Error output from haproxy_ng:
2012/05/17-21:59:00 [17147] Can’t exec “/etc/munin/plugins/haproxy_ng”: No such file or directory at /usr/share/perl5/Munin/Node/Service.pm line 215.
2012/05/17-21:59:00 [17147] # ERROR: Failed to exec.
Thank you.
Sounds like it’s a symlink pointing to nothing. Make sure to copy the plugin in and make it executable.
If you still have problems, asking politely on irc, #munin on freenode or oftc will often give you the help needed.
I have same issue, but symlink is there and it is excutable. When try cat that path it seams fine. What might be the problem?
Can’t exec “/etc/munin/plugins/haproxy_ng”: No such file or directory at /usr/share/perl5/Munin/Node/Service.pm line 215.
You, like me, probably downloaded the file directly.
You need to replace the @@PERL@@ on the first line of the file with the output of the command `which perl`
I am a munin newbie, so maybe I am missing something basic. I installed and configured the plugin, and html pages for HAProxy get generated, but no images get generated (they are all broken links).
When I run the plugin, this is what I see:
# sudo -u munin munin-run haproxy_ng
multigraph HAPActive
multigraph HAPBandwidthBack
multigraph HAPBandwidthFront
multigraph HAPErrorsBack
multigraph HAPErrorsFront
multigraph HAPSessionsBack
multigraph HAPSessionsFront
multigraph HAPUptime
How can I debug this problem and figure out why the images aren’t being generated?
Thanks,
Jeff
Nevermind, I figured it out. I had labeled the section in my /etc/munin/plugin-conf.d/munin-node file [haproxy] instead of [haproxy_ng]. It’s working now. Thanks for writing this plugin!
Thanks!
I’m glad you figured it out
Actually, the example at the top of the plugin source code says to use [haproxy_backend]. Is that correct? It seems to be working for me with [haproxy_ng]…
It needs to be consistent with the plugin-name in /etc/munin/plugins, so you’ve spotted an error in the example there.
[haproxy_ng] or [haproxy_*], etc. will work.
I will fix the doc-error; Thanks again
Thanks for a great plugin.
Need to use this plugin for multiple instances on same server. Configured as below;
[haproxy_client1_backend]
env.url http://client1.example.com/haproxy-status;csv;norefresh
env.username monitor
env.password somepasswordorother
[haproxy_client2_backend]
env.url http://client2.example.com/haproxy-status;csv;norefresh
env.username monitor
env.password somepasswordorother
Got few graphs working, but not all. And those I can see only after clicking headers, not on main pages. Most importantly frontend graphs for both instances not shown. It shows only one graph of the client1 which is 1st alphabetically.
Can you please help me with your plugin to configure it for multiple instances.
Thanks in Advance.
Gourav
The plugin isn’t written to split up different instances of itself like this. You can achieve this by using host_name in the config, and creating different sets of hosts in your munin overview.
Or, the plugin needs to be patched. Which would probably be a bit of work, and not something I would be able to do anytime soon I’m afraid.