Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
global_defs {
   notification_email {
     bvan@slac.stanford.edu
   }
   notification_email_from bvan@slac.stanford.edu
   smtp_server smtp.slac.stanford.edu  # Not sure if this works
   smtp_connect_timeout 30
   router_id SCA_WWW  # Not sure if this is used
}
 
# This is a health check script. Right now it just checks to see
# if nginx is up.
#
# Note on the weight: If the weight isn't enough to break a tie usingbetween
# the
# priortypriority differentdifference between sca-nginx01 and sca-nginx02, and
# nginx is down but sca-nginx01 is up, then requests
# may still go to sca-nginx01.
vrrp_script chk_nginx {
      script "killall -0 nginx"
      interval 2 # seconds
      weight 2 # points
}
vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 85 # Random ID. We shouldn't have the same router id on the same subnet
    priority 100  # See note on weight above
    advert_int 1 # Advertisement interval (i.e. heartbeat seconds)
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        134.79.129.86
    }
    track_script {
         chk_nginx
    }
   unicast_src_ip 134.79.129.92   # Unicast specific option, this is the IP of the interface keepalived listens on
   unicast_peer {                 # Unicast specific option, this is the IP of the peer instance 
     134.79.129.91
   }
}

...