FarmGuardian is a more intensive, specific response check for real servers. For example, lets say you have three real servers running the tomcat service. By default Zen only checks that the tomcat port is up and responding but it does not check if tomcat actually loading websites properly. With FarmGuardian you could create a script that would connect to the tomcat service, download the actual website content and it checks it for specific content. This is a more advanced service heart-beat check than Zen does by default.
The way FarmGuardian works is that it connects to the farm and obtains the real servers’ IP addresses and the real ports. It then runs your scripts to all of the real servers for each farm. If your script output is ok ($?=0) then FarmGuardian does nothing. However if your output script is not ok ($?<>0) FarmGuardian will then disable the real ip for that server on the farm, just as the standard check for an active server does.
There is a directory (/usr/local/zenloadbalancer/app/libexec) with general scripts (the default Nagios scripts are in this directory). DO NOT USE check_content, it isn’t working fine, delete it. In this directory you can add your own scripts and once you configure “use farmguardian to check backend server” your scripts will run, for example:
yourscript -yourparams HOST PORT
NOTE: Make sure you use the actual strings “HOST”and “PORT” in your script. FarmGuardian will replace those with a real ip and a real port of others backend servers on your farm.
Here is an example for an OpenLdap farm. It basically says connect to PORT on HOST and search for the string “Openldap”. If that string exists the output is 0 (meaning the backend server is OK) otherwise the response is <>0 (the backend server has some issue).
You can check the “active logs” and read the output file (/usr/local/zenloadbalancer/logsfarmguardian*) for details on what FarmGuardian is doing.
Please do not confuse real server monitoring tools, such as Nagios, with FarmGuardian. FarmGuardian is used by Zen only as a more advanced check of your servers. For real server monitoring you should use your own monitoring tools.