Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Load balancer (relayd) monitor using script

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rcnature
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • R
          rcnature
          last edited by

          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.

          #!/bin/sh
          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" ]
          then
                  echo 0
          else
                  echo 1
          fi

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.