Blame doc/source/programs_synopsis.rst

Packit c22fc9
############################
Packit c22fc9
Keepalived programs synopsis
Packit c22fc9
############################
Packit c22fc9
Packit c22fc9
Keepalived package comes with 2 programs.
Packit c22fc9
Packit c22fc9
keepalived daemon
Packit c22fc9
*****************
Packit c22fc9
Packit c22fc9
The keepalived command line arguments are:
Packit c22fc9
Packit c22fc9
.. glossary::
Packit c22fc9
Packit c22fc9
    -f, --use-file=FILE
Packit c22fc9
        Use the specified configuration file. The default configuration file is "/etc/keepalived/keepalived.conf".
Packit c22fc9
Packit c22fc9
    -P, --vrrp
Packit c22fc9
        Only run the VRRP subsystem. This is useful for configurations that do not use IPVS load balancer.
Packit c22fc9
Packit c22fc9
    -C, --check
Packit c22fc9
        Only run the healthcheck subsystem. This is useful for configurations that use the IPVS load balancer with a single director with no failover.
Packit c22fc9
Packit c22fc9
    -l, --log-console
Packit c22fc9
        Log messages to the local console. The default behavior is to log messages to syslog.
Packit c22fc9
Packit c22fc9
    -D, --log-detail
Packit c22fc9
        Detailed log messages.
Packit c22fc9
Packit c22fc9
    -S, --log-facility=[0-7]
Packit c22fc9
        Set syslog facility to LOG_LOCAL[0-7]. The default syslog facility is LOG_DAEMON.
Packit c22fc9
Packit c22fc9
    -V, --dont-release-vrrp
Packit c22fc9
        Don’t remove VRRP VIPs and VROUTEs on daemon stop. The default behavior is to remove all VIPs and VROUTEs when keepalived exits
Packit c22fc9
Packit c22fc9
    -I, --dont-release-ipvs
Packit c22fc9
        Don’t remove IPVS topology on daemon stop. The default behavior is to remove all entries from the IPVS virtual server table on when keepalived exits.
Packit c22fc9
Packit c22fc9
    -R, --dont-respawn
Packit c22fc9
        Don’t respawn child processes. The default behavior is to restart the VRRP and checker processes if either process exits.
Packit c22fc9
Packit c22fc9
    -n, --dont-fork
Packit c22fc9
        Don’t fork the daemon process. This option will cause keepalived to run in the foreground.
Packit c22fc9
Packit c22fc9
    -d, --dump-conf
Packit c22fc9
        Dump the configuration data.
Packit c22fc9
Packit c22fc9
    -p, --pid=FILE
Packit c22fc9
        Use specified pidfile for parent keepalived process. The default pidfile for keepalived is "/var/run/keepalived.pid".
Packit c22fc9
Packit c22fc9
    -r, --vrrp_pid=FILE
Packit c22fc9
        Use specified pidfile for VRRP child process. The default pidfile for the VRRP child process is "/var/run/keepalived_vrrp.pid".
Packit c22fc9
Packit c22fc9
    -c, --checkers_pid=FILE
Packit c22fc9
        Use specified pidfile for checkers child process. The default pidfile for the checker child process is "/var/run/keepalived_checkers.pid".
Packit c22fc9
Packit c22fc9
    -x, --snmp
Packit c22fc9
        Enable SNMP subsystem.
Packit c22fc9
Packit c22fc9
    -v, --version
Packit c22fc9
        Display the version and exit.
Packit c22fc9
Packit c22fc9
    -h, --help
Packit c22fc9
        Display this help message and exit.
Packit c22fc9
Packit c22fc9
genhash utility
Packit c22fc9
***************
Packit c22fc9
Packit c22fc9
The ``genhash`` binary is used to generate digest strings. The genhash command
Packit c22fc9
line arguments are:
Packit c22fc9
Packit c22fc9
.. glossary::
Packit c22fc9
Packit c22fc9
    --use-ssl, -S
Packit c22fc9
          Use SSL to connect to the server.
Packit c22fc9
Packit c22fc9
    --server <host>, -s
Packit c22fc9
          Specify the ip address to connect to.
Packit c22fc9
Packit c22fc9
    --port <port>, -p
Packit c22fc9
          Specify the port to connect to.
Packit c22fc9
Packit c22fc9
    --url <url>, -u
Packit c22fc9
          Specify the path to the file you want to generate the hash of.
Packit c22fc9
Packit c22fc9
    --use-virtualhost <host>, -V
Packit c22fc9
          Specify the virtual host to send along with the HTTP headers.
Packit c22fc9
Packit c22fc9
    --hash <alg>, -H
Packit c22fc9
          Specify the hash algorithm to make a digest of the target page.   Consult  the
Packit c22fc9
          help screen for list of available ones with a mark of the default one.
Packit c22fc9
Packit c22fc9
    --verbose, -v
Packit c22fc9
          Be verbose with the output.
Packit c22fc9
Packit c22fc9
    --help, -h
Packit c22fc9
          Display the program help screen and exit.
Packit c22fc9
Packit c22fc9
    --release, -r
Packit c22fc9
          Display the release number (version) and exit.
Packit c22fc9
Packit c22fc9
Running Keepalived daemon
Packit c22fc9
*************************
Packit c22fc9
Packit c22fc9
To run Keepalived simply type::
Packit c22fc9
Packit c22fc9
    [root@lvs tmp]# /etc/rc.d/init.d/keepalived.init start
Packit c22fc9
    Starting Keepalived for LVS:                            [ OK ]
Packit c22fc9
Packit c22fc9
All daemon messages are logged through the Linux syslog. If you start Keepalived with the “dump configuration data” option, you should see in your /var/log/messages (on Debian this may be */var/log/daemon.log* depending on your syslog configuration) something like this::
Packit c22fc9
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Starting Keepalived v0.6.1 (06/13, 2002)
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Configuration is using : 92013 Bytes
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: ------< Global definitions >------
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: LVS ID = LVS_PROD
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Smtp server = 192.168.200.1
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Smtp server connection timeout = 30
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Email notification from = keepalived@domain.com
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Email notification = alert@domain.com
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Email notification = 0633556699@domain.com
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: ------< SSL definitions >------
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: Using autogen SSL context
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: ------< LVS Topology >------
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: System is compiled with LVS v0.9.8
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: VIP = 10.10.10.2, VPORT = 80
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: VirtualHost = www.domain1.com
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: delay_loop = 6, lb_algo = rr
Packit c22fc9
    Jun 7 18:17:03 lvs1 Keepalived: persistence timeout = 50
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: persistence granularity = 255.255.240.0
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: protocol = TCP
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: lb_kind = NAT
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: sorry server = 192.168.200.200:80
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: RIP = 192.168.200.2, RPORT = 80, WEIGHT = 1
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: RIP = 192.168.200.3, RPORT = 80, WEIGHT = 2
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: VIP = 10.10.10.3, VPORT = 443
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: VirtualHost = www.domain2.com
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: delay_loop = 3, lb_algo = rr
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: persistence timeout = 50
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: protocol = TCP
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: lb_kind = NAT
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: RIP = 192.168.200.4, RPORT = 443, WEIGHT = 1
Packit c22fc9
    Jun 7 18:17:04 lvs1 Keepalived: RIP = 192.168.200.5, RPORT = 1358, WEIGHT = 1
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: ------< Health checkers >------
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: 192.168.200.2:80
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Keepalive method = HTTP_GET
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Connection timeout = 3
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Nb get retry = 3
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Delay before retry = 3
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Checked url = /testurl/test.jsp,
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: digest = 640205b7b0fc66c1ea91c463fac6334d
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: 192.168.200.3:80
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Keepalive method = HTTP_GET
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Connection timeout = 3
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Nb get retry = 3
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Delay before retry = 3
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Checked url = /testurl/test.jsp,
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: digest = 640205b7b0fc66c1ea91c463fac6334c
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: Checked url = /testurl2/test.jsp,
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: digest = 640205b7b0fc66c1ea91c463fac6334c
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: 192.168.200.4:443
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Keepalive method = SSL_GET
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Connection timeout = 3
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Nb get retry = 3
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Delay before retry = 3
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Checked url = /testurl/test.jsp,
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: digest = 640205b7b0fc66c1ea91c463fac6334d
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Checked url = /testurl2/test.jsp,
Packit c22fc9
    Jun 7 18:17:05 lvs1 Keepalived: digest = 640205b7b0fc66c1ea91c463fac6334d
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: 192.168.200.5:1358
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Keepalive method = TCP_CHECK
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Connection timeout = 3
Packit c22fc9
    Jun 7 18:17:06 lvs1 Keepalived: Registering Kernel netlink reflector
Packit c22fc9