Load balancer (relayd) monitor using script

  • Is there anyone knows if pfsense will or currently have the possibility of using the "Check script" type of monitor in the load balancer module. Which technically should be possible as it's supported by relayd and this type of monitor is documented for it.

    I did a script to validate the functionality of multiple proxy servers in a load-balanced configuration but can't use it in pfsense.

    Right now only the TCP type is working but for us this is not enough. We need to be sure that our proxies are not just running but have access to the internet. Which i can achieve with the script.
    The other HTTP and Send/expect monitors doesn't give good result so far with a proxy server.

    Thanks for any advice.

  • no immediate plans to add such support. Couldn't you put up a web page of some sort that accomplishes the same end result and query that with a HTTP or HTTPS monitor? That's often what people do for more comprehensive health checks of web servers.

  • I can't customize directly on the proxy servers that i want to monitor but your suggestion is a very good one and i will make some test to see if i can produce the report the HTTP monitor need across the proxy to that custom URL on a web server we own.

    Here an example of a simple script i run on the pfsense box that give me the right result but unable to get work using the usual HTTP monitor.

    GETPROX=printf "GET http://www.google.com\r\n\r\n"" | nc $1 80 | head -n1
    PROXR=echo $GETPROX | grep "200 OK"
    if [ -z "$PROXR" ]
            echo 0
            echo 1

Log in to reply