#MISC healthchecker, run a program
                         MISC_CHECK
                         {
                             # External system script or program
                             misc_path <STRING>|<QUOTED-STRING>
                             # Script execution timeout
                             misc_timeout <INT>

                             # If set, exit code from healthchecker is used
                             # to dynamically adjust the weight as follows:
                             #   exit status 0: svc check success, weight
                             #     unchanged.
                             #   exit status 1: svc check failed.
                             #   exit status 2-255: svc check success, weight
                             #     changed to 2 less than exit status.
                             #   (for example: exit status of 255 would set
                             #     weight to 253)
                             misc_dynamic

         

通过编写脚本,对返回的值进行判断

exit 0:健康检查正常,keepalived状态正常

exit 1:检测失败,keepalived 状态异常

exit 退出值等于其他值时,需要修改值为小于exit status的状态码