Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
HAProxy in a High Availability scenario. How to enable statistics on both nodes?
« previous
next »
Print
Pages: [
1
]
Author
Topic: HAProxy in a High Availability scenario. How to enable statistics on both nodes? (Read 3543 times)
spyram
Newbie
Posts: 3
Karma: 0
HAProxy in a High Availability scenario. How to enable statistics on both nodes?
«
on:
April 11, 2019, 12:38:17 pm »
Hi,
I'm currently running HAProxy on OPN19.1.5
My setup consists of two VMs configured with High Availability and config replication using XMLRPC.
To enable remote access to statistics, I'm using a management IP address of the box and it works fine for the primary node.
The problem comes with the replication. When OPNSense replicates HA Proxy config, it copies the same address/port for statistics to the secondary node.
So every time I change my config, I need to login to the secondary node and change the IP accordingly otherwise my HAProxy sometimes fails to start on the secondary node.
Could OPNSense HA plugin request an extra field to setup the statistics on the secondary server? Somehow like it already has on the peer configuration?
Or am I doing something wrong in my setup?
Thanks in advance.
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: HAProxy in a High Availability scenario. How to enable statistics on both nodes?
«
Reply #1 on:
April 11, 2019, 01:14:45 pm »
Are both nodes active? Normally this is only for CARP setups.
If you only want replication you can enable it for one-time sync and disable again.
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
spyram
Newbie
Posts: 3
Karma: 0
Re: HAProxy in a High Availability scenario. How to enable statistics on both nodes?
«
Reply #2 on:
April 12, 2019, 06:47:51 pm »
Hi,
Both nodes are indeed active (using CARP).
One is serving HA Proxy and the other is serving as default gateway for internal services. If one has a problem, the other should pick up the service.
But since I want to be able to monitor remotely HA Proxy from a nagios like platform, I need to check statistic pages from each node.
Logged
hbc
Hero Member
Posts: 501
Karma: 47
Re: HAProxy in a High Availability scenario. How to enable statistics on both nodes?
«
Reply #3 on:
April 12, 2019, 08:28:52 pm »
If it is a HA setup, usually it's active-passive, one node should have the traffic and the passive one none. So why monitor the inactive node? Statistics should be zero. Just monitor the VIP. So you always get the statistics of the active node.
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR
spyram
Newbie
Posts: 3
Karma: 0
Re: HAProxy in a High Availability scenario. How to enable statistics on both nodes?
«
Reply #4 on:
April 12, 2019, 08:44:27 pm »
Hi,
Thanks for the reply,
What you're suggesting is that I point the monitoring address to a VIP right?
The VIP served by HA Proxy is a web front-end for our public site and I'm currently monitoring this box through a management address from the inside.
So, I'm guessing the best way to do this would be to set a VIP on the management network and bind the stats IP to that one right?
I'm not sure if I can force that VIP on the private management network to be on the same host of the Public VIP but if not, I'll make this box a true active-passive.
Thanks for the input.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
HAProxy in a High Availability scenario. How to enable statistics on both nodes?