|
Packit |
c22fc9 |
#################################
|
|
Packit |
c22fc9 |
Keepalived configuration synopsis
|
|
Packit |
c22fc9 |
#################################
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
The Keepalived configuration file uses the following synopsis (configuration keywords are Bold/Italic):
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Global Definitions Synopsis
|
|
Packit |
c22fc9 |
***************************
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
.. parsed-literal::
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
**global_defs** {
|
|
Packit |
c22fc9 |
**notification_email** {
|
|
Packit |
c22fc9 |
email
|
|
Packit |
c22fc9 |
email
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**notification_email_from** email
|
|
Packit |
c22fc9 |
**smtp_server** host
|
|
Packit |
c22fc9 |
**smtp_connect_timeout** num
|
|
Packit Service |
dfccb1 |
**router_id** string
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
======================== ====================================================== =========
|
|
Packit |
c22fc9 |
Keyword Definition Type
|
|
Packit |
c22fc9 |
======================== ====================================================== =========
|
|
Packit |
c22fc9 |
global_defs identify the global def configuration block
|
|
Packit |
c22fc9 |
notification_email email accounts that will receive the notification mail List
|
|
Packit |
c22fc9 |
notification_email_from email to use when processing “MAIL FROM:” SMTP command List
|
|
Packit |
c22fc9 |
smtp_server remote SMTP server to use for sending mail notifications alphanum
|
|
Packit Service |
dfccb1 |
smtp_connect_timeout specify a timeout for SMTP stream processing numerical
|
|
Packit Service |
dfccb1 |
router_id specify the name of the LVS director string
|
|
Packit |
c22fc9 |
======================== ====================================================== =========
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Email type: Is a string using charset as specified into the SMTP RFC eg: “user@domain.com”
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Virtual Server Definitions Synopsis
|
|
Packit |
c22fc9 |
***********************************
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
.. parsed-literal::
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
**virtual_server** (@IP PORT)|(*fwmark* num) {
|
|
Packit |
c22fc9 |
**delay_loop** num
|
|
Packit |
c22fc9 |
**lb_algo** *rr|wrr|lc|wlc|sh|dh|lblc*
|
|
Packit |
c22fc9 |
**lb_kind** *NAT|DR|TUN*
|
|
Packit |
c22fc9 |
**(nat_mask** @IP)
|
|
Packit |
c22fc9 |
**persistence_timeout** num
|
|
Packit |
c22fc9 |
**persistence_granularity** @IP
|
|
Packit |
c22fc9 |
**virtualhost** string
|
|
Packit |
c22fc9 |
**protocol** *TCP|UDP*
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
**sorry_server** @IP PORT
|
|
Packit |
c22fc9 |
**real_server** @IP PORT {
|
|
Packit |
c22fc9 |
**weight** num
|
|
Packit |
c22fc9 |
**TCP_CHECK** {
|
|
Packit |
c22fc9 |
**connect_port** num
|
|
Packit |
c22fc9 |
**connect_timeout** num
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**real_server** @IP PORT {
|
|
Packit |
c22fc9 |
**weight** num
|
|
Packit |
c22fc9 |
**MISC_CHECK** {
|
|
Packit |
c22fc9 |
**misc_path** /path_to_script/script.sh
|
|
Packit |
c22fc9 |
(or **misc_path** “ /path_to_script/script.sh <arg_list>”)
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**real_server** @IP PORT {
|
|
Packit |
c22fc9 |
**weight** num
|
|
Packit |
c22fc9 |
**HTTP_GET|SSL_GET** {
|
|
Packit |
c22fc9 |
**url** { # You can add multiple url block
|
|
Packit |
c22fc9 |
**path** alphanum
|
|
Packit |
c22fc9 |
**digest** alphanum
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**connect_port** num
|
|
Packit |
c22fc9 |
**connect_timeout** num
|
|
Packit |
c22fc9 |
**retry** num
|
|
Packit |
c22fc9 |
**delay_before_retry** num
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
======================= =========================================================== =========
|
|
Packit |
c22fc9 |
Keyword Definition Type
|
|
Packit |
c22fc9 |
======================= =========================================================== =========
|
|
Packit |
c22fc9 |
virtual_server identify a virtual server definition block
|
|
Packit |
c22fc9 |
fwmark specify that virtual server is a FWMARK
|
|
Packit |
c22fc9 |
delay_loop specify in seconds the interval between checks numerical
|
|
Packit |
c22fc9 |
lb_algo select a specific scheduler (rr|wrr|lc|wlc...) string
|
|
Packit |
c22fc9 |
lb_kind select a specific forwarding method (NAT|DR|TUN) string
|
|
Packit |
c22fc9 |
persistence_timeout specify a timeout value for persistent connections numerical
|
|
Packit |
c22fc9 |
persistence_granularity specify a granularity mask for persistent connections
|
|
Packit |
c22fc9 |
virtualhost specify a HTTP virtualhost to use for HTTP|SSL_GET alphanum
|
|
Packit |
c22fc9 |
protocol specify the protocol kind (TCP|UDP) numerical
|
|
Packit |
c22fc9 |
sorry_server server to be added to the pool if all real servers are down
|
|
Packit |
c22fc9 |
real_server specify a real server member
|
|
Packit |
c22fc9 |
weight specify the real server weight for load balancing decisions numerical
|
|
Packit |
c22fc9 |
TCP_CHECK check real server availability using TCP connect
|
|
Packit |
c22fc9 |
MISC_CHECK check real server availability using user defined script
|
|
Packit |
c22fc9 |
misc_path identify the script to run with full path path
|
|
Packit |
c22fc9 |
HTTP_GET check real server availability using HTTP GET request
|
|
Packit |
c22fc9 |
SSL_GET check real server availability using SSL GET request
|
|
Packit |
c22fc9 |
url identify a url definition block
|
|
Packit |
c22fc9 |
path specify the url path alphanum
|
|
Packit |
c22fc9 |
digest specify the digest for a specific url path alphanum
|
|
Packit |
c22fc9 |
connect_port connect remote server on specified TCP port numerical
|
|
Packit |
c22fc9 |
connect_timeout connect remote server using timeout numerical
|
|
Packit |
c22fc9 |
retry maximum number of retries numerical
|
|
Packit |
c22fc9 |
delay_before_retry delay between two successive retries numerical
|
|
Packit |
c22fc9 |
======================= =========================================================== =========
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
.. note::
|
|
Packit |
c22fc9 |
The "nat_mask" keyword is obsolete if you are not using LVS with Linux kernel 2.2 series. This flag give you the ability to define the reverse NAT granularity.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
.. note::
|
|
Packit |
c22fc9 |
Currently, Healthcheck framework, only implements TCP protocol for service monitoring.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
.. note::
|
|
Packit |
c22fc9 |
Type "path" refers to the full path of the script being called. Note that for scripts requiring arguments the path and arguments must be enclosed in double quotes (").
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
VRRP Instance Definitions Synopsis
|
|
Packit |
c22fc9 |
**********************************
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
.. parsed-literal::
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
**vrrp_sync_group** string {
|
|
Packit |
c22fc9 |
**group** {
|
|
Packit |
c22fc9 |
string
|
|
Packit |
c22fc9 |
string
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**notify_master** /path_to_script/script_master.sh
|
|
Packit |
c22fc9 |
(or **notify_master** “ /path_to_script/script_master.sh <arg_list>”)
|
|
Packit |
c22fc9 |
**notify_backup** /path_to_script/script_backup.sh
|
|
Packit |
c22fc9 |
(or **notify_backup** “/path_to_script/script_backup.sh <arg_list>”)
|
|
Packit |
c22fc9 |
**notify_fault** /path_to_script/script_fault.sh
|
|
Packit |
c22fc9 |
(or **notify_fault** “ /path_to_script/script_fault.sh <arg_list>”)
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**vrrp_instance** string {
|
|
Packit |
c22fc9 |
**state** *MASTER|BACKUP*
|
|
Packit |
c22fc9 |
**interface** string
|
|
Packit |
c22fc9 |
**mcast_src_ip** @IP
|
|
Packit |
c22fc9 |
**lvs_sync_daemon_interface** string
|
|
Packit |
c22fc9 |
**virtual_router_id** num
|
|
Packit |
c22fc9 |
**priority** num
|
|
Packit |
c22fc9 |
**advert_int** num
|
|
Packit |
c22fc9 |
**smtp_alert**
|
|
Packit |
c22fc9 |
**authentication** {
|
|
Packit |
c22fc9 |
**auth_type** *PASS|AH*
|
|
Packit |
c22fc9 |
**auth_pass** string
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**virtual_ipaddress** { # Block limited to 20 IP addresses
|
|
Packit |
c22fc9 |
@IP
|
|
Packit |
c22fc9 |
@IP
|
|
Packit |
c22fc9 |
@IP
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**virtual_ipaddress_excluded** { # Unlimited IP addresses
|
|
Packit |
c22fc9 |
@IP
|
|
Packit |
c22fc9 |
@IP
|
|
Packit |
c22fc9 |
@IP
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
**notify_master** /path_to_script/script_master.sh
|
|
Packit |
c22fc9 |
(or **notify_master** “ /path_to_script/script_master.sh <arg_list>”)
|
|
Packit |
c22fc9 |
**notify_backup** /path_to_script/script_backup.sh
|
|
Packit |
c22fc9 |
(or **notify_backup** “ /path_to_script/script_backup.sh <arg_list>”)
|
|
Packit |
c22fc9 |
**notify_fault** /path_to_script/script_fault.sh
|
|
Packit |
c22fc9 |
(or **notify_fault** “ /path_to_script/script_fault.sh <arg_list>”)
|
|
Packit |
c22fc9 |
}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
========================== ======================================================================= =========
|
|
Packit |
c22fc9 |
Keyword Definition Type
|
|
Packit |
c22fc9 |
========================== ======================================================================= =========
|
|
Packit |
c22fc9 |
vrrp_instance identify a VRRP instance definition block
|
|
Packit |
c22fc9 |
state specify the instance state in standard use
|
|
Packit |
c22fc9 |
Interface specify the network interface for the instance to run on string
|
|
Packit |
c22fc9 |
mcast_src_ip specify the src IP address value for VRRP adverts IP header
|
|
Packit |
c22fc9 |
lvs_sync_daemon_inteface specify the network interface for the LVS sync_daemon to run on string
|
|
Packit |
c22fc9 |
virtual_router_id specify to which VRRP router id the instance belongs numerical
|
|
Packit |
c22fc9 |
priority specify the instance priority in the VRRP router numerical
|
|
Packit |
c22fc9 |
advert_int specify the advertisement interval in seconds (set to 1) numerical
|
|
Packit |
c22fc9 |
smtp_alert Activate the SMTP notification for MASTER state transition
|
|
Packit |
c22fc9 |
authentication identify a VRRP authentication definition block
|
|
Packit |
c22fc9 |
auth_type specify which kind of authentication to use (PASS|AH)
|
|
Packit |
c22fc9 |
auth_pass specify the password string to use string
|
|
Packit |
c22fc9 |
virtual_ipaddress identify a VRRP VIP definition block
|
|
Packit |
c22fc9 |
virtual_ipaddress_excluded identify a VRRP VIP excluded definition block (not protocol VIPs)
|
|
Packit |
c22fc9 |
notify_master specify a shell script to be executed during transition to master state path
|
|
Packit |
c22fc9 |
notify_backup specify a shell script to be executed during transition to backup state path
|
|
Packit |
c22fc9 |
notify_fault specify a shell script to be executed during transition to fault state path
|
|
Packit |
c22fc9 |
vrrp_sync_group Identify the VRRP synchronization instances group string
|
|
Packit |
c22fc9 |
========================== ======================================================================= =========
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Path type: A system path to a script eg: “/usr/local/bin/transit.sh <arg_list>”
|