zoukankan      html  css  js  c++  java
  • keepalived健康检查 HTTP_GET

    一:

    real_server 192.168.2.188 80 {
         weight 1
         HTTP_GET {
           url {
           path /index.html
           digest bfaa334fdd71444e45eca3b7a1679a4a #http://192.168.2.188/index.html的digest值          }
                connect_timeout 3
                nb_get_retry 3
                delay_before_retry 3
            }

    digest值的获取方法:
    [root@188-test html]# genhash -s 192.168.2.188 -p 80 -u /index.html
    MD5SUM = bfaa334fdd71444e45eca3b7a1679a4a
    genhash命令:
    [root@188-test html]# genhash
    genhash v1.0.0 (18/11, 2002)
    Usage:
      genhash -s server-address -p port -u url
      genhash -S -s server-address -p port -u url
      genhash -h
      genhash -r

    Commands:
    Either long or short options are allowed.
      genhash --use-ssl         -S       Use SSL connection to remote server.
      genhash --server          -s       Use the specified remote server address.
      genhash --port            -p       Use the specified remote server port.
      genhash --url             -u       Use the specified remote server url.
      genhash --use-virtualhost -V       Use the specified virtualhost in GET query.
      genhash --verbose         -v       Use verbose mode output.
      genhash --help            -h       Display this short inlined help screen.
      genhash --release         -r       Display the release number


    二:

    real_server 192.168.2.188 80 {
          weight 1
          HTTP_GET {
              url {
              path /index.html
              status_code 200     #http://192.168.2.188/index.html的返回状态码
                }
  • 相关阅读:
    go语言最新版本 下载地址
    PHP5 各版本维护时间
    springzuul本地路由和跨服务器路由问题
    大数据学习路线(转载)
    springcoud feign超时的问题
    java 桥接模式
    springcloud单个服务内存使用详情
    centos7搭建filebeat
    centos7搭建logstash
    centos7搭建kibana
  • 原文地址:https://www.cnblogs.com/xzlive/p/12097601.html
Copyright © 2011-2022 走看看