Tu peux tout à fait spécifier ton propre script, et LVS se basera sur la valeur de retour du script en question pour considérer que le service est fonctionnel ou pas. Pour cela, il faut utiliser MISC_CHECK:
" MISC_CHECK: This check allows a user defined script to be run as the health checker. The result must be 0 or 1. The script is run on the director box and this is an ideal way to test in-house applications. Scripts that can be run without arguments can be called using the full
path (i.e. /path_to_script/script.sh). Those requiring arguments need to be enclosed in double quotes (i.e. "/path_to_script/script.sh arg1 ... argn")"
[^] # Re: LVS Keepalived
Posté par Mathieu Dessus (site web personnel) . En réponse au message LVS - Scripts de monitoring. Évalué à 1.
" MISC_CHECK: This check allows a user defined script to be run as the health checker. The result must be 0 or 1. The script is run on the director box and this is an ideal way to test in-house applications. Scripts that can be run without arguments can be called using the full
path (i.e. /path_to_script/script.sh). Those requiring arguments need to be enclosed in double quotes (i.e. "/path_to_script/script.sh arg1 ... argn")"
( http://www.keepalived.org/pdf/UserGuide.pdf )