diff options
-rw-r--r-- | usr.sbin/hostatectl/hostatectl.8 | 17 | ||||
-rw-r--r-- | usr.sbin/hostated/hostated.8 | 39 | ||||
-rw-r--r-- | usr.sbin/hostated/hostated.conf.5 | 63 | ||||
-rw-r--r-- | usr.sbin/hoststatectl/hoststatectl.8 | 17 | ||||
-rw-r--r-- | usr.sbin/hoststated/hoststated.8 | 39 | ||||
-rw-r--r-- | usr.sbin/hoststated/hoststated.conf.5 | 63 | ||||
-rw-r--r-- | usr.sbin/relayctl/relayctl.8 | 17 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.8 | 39 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.conf.5 | 63 |
9 files changed, 174 insertions, 183 deletions
diff --git a/usr.sbin/hostatectl/hostatectl.8 b/usr.sbin/hostatectl/hostatectl.8 index 2b5fe52a00e..a6f21c2101c 100644 --- a/usr.sbin/hostatectl/hostatectl.8 +++ b/usr.sbin/hostatectl/hostatectl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hostatectl.8,v 1.3 2006/12/16 18:50:33 reyk Exp $ +.\" $OpenBSD: hostatectl.8,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> .\" @@ -33,19 +33,21 @@ daemon. .Pp The following commands are available: .Bl -tag -width Ds -.It Cm show -.It Cm show summary -Show status of services, tables and hosts. +.It Cm show Op Cm summary +Show status of services, tables, and hosts. +The keyword +.Cm summary +is optional. .It Cm service disable Op Ar name | id Disable a service. If it has .Xr pf 4 redirection rules installed, remove them. -Mark the service's main table and - -if applicable - backup table disabled as well. +Mark the service's main table and \(en +if applicable \(en backup table disabled as well. .It Cm service enable Op Ar name | id Enable a service. -Mark the service's main table and - if applicable - backup +Mark the service's main table and \(en if applicable \(en backup table enabled as well. .It Cm table disable Op Ar name | id Disable a table. @@ -72,5 +74,4 @@ Unix-domain socket used for communication with .Xr hostated 8 . .El .Sh SEE ALSO -.Xr hostated.conf 5 , .Xr hostated 8 diff --git a/usr.sbin/hostated/hostated.8 b/usr.sbin/hostated/hostated.8 index ff8c587f978..df39ac4d429 100644 --- a/usr.sbin/hostated/hostated.8 +++ b/usr.sbin/hostated/hostated.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hostated.8,v 1.3 2006/12/16 12:42:14 reyk Exp $ +.\" $OpenBSD: hostated.8,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> .\" @@ -27,55 +27,54 @@ .Sh DESCRIPTION .Nm is the host status daemon for server load balancing. -Its main purpose is to maintain pf tables up to date -as well as related pf rdr rules. -To communicate with +Its main purpose is to keep .Xr pf 4 +tables up to date +as well as any related pf rdr rules. +To communicate with pf, .Nm uses the anchor facility. To enable .Nm -to install rulesets through the anchor you will -need the following line in the NAT section of your -.Xr pf.conf 5 -configuration file: -.Bd -literal -offset 2n +to install rulesets through the anchor, +the following line is required in the NAT section of +.Xr pf.conf 5 : +.Bd -literal -offset indent rdr-anchor "hostated/*" .Ed .Pp .Nm -manipulates three data types: services, tables and hosts. +manipulates three data types: services, tables, and hosts. Each service represents a .Xr pf 4 rdr rule. -A service contains at least one table and one virtual ip which are +A service contains at least one table and one virtual IP which are used to create the proper rule. -Each table contains at least one host, and is mapped to a -.Xr pf 4 -table. -Additionnaly, a table can be backed up i.e its content will be swapped +Each table contains at least one host, and is mapped to a pf table. +Additionally a table can be backed up i.e. its content will be swapped by the content of another table when it is empty. This can be used to serve static content when a dynamic service goes down. See .Xr hostated.conf 5 for a more detailed explanation of how to configure -.Nm -. +.Nm . .Pp .Xr hostatectl 8 -can be used to enable or disable hosts, tables and services as well +can be used to enable or disable hosts, tables, and services as well as showing the current status of each object. .Pp The options are as follows: .Bl -tag -width Ds .It Fl d Do not daemonize. -If this options is specified, +If this option is specified, .Nm will run in the foreground and log to .Em stderr . .It Fl f Ar file -Specify an alternative configurate file. +Specify an alternative configuration file. +The default is +.Pa /etc/hostated.conf . .It Fl n Configtest mode. Only check the configuration file for validity. diff --git a/usr.sbin/hostated/hostated.conf.5 b/usr.sbin/hostated/hostated.conf.5 index 4b41e0b26b3..9fa47766991 100644 --- a/usr.sbin/hostated/hostated.conf.5 +++ b/usr.sbin/hostated/hostated.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hostated.conf.5,v 1.3 2006/12/16 12:42:14 reyk Exp $ +.\" $OpenBSD: hostated.conf.5,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> .\" @@ -19,17 +19,14 @@ .Os .Sh NAME .Nm hostated.conf -.Nd Host Status daemon configuration file. +.Nd Host Status daemon configuration file .Sh DESCRIPTION -The -.Xr hostated 8 -daemon maintains -.Xr pf 4 -tables up to date. +.Nm +is the configuration file for the Host Status Daemon, +.Xr hostated 8 . .Sh SECTIONS -The .Nm -configuration file is divided into four main sections. +is divided into four main sections: .Bl -tag -width xxxx .It Sy Macros User-defined variables may be defined and used later, simplifying the @@ -87,38 +84,37 @@ Only one health-checking method can be used per table. Table specific configuration directives are described below. .Bl -tag -width Ds .It Ic check tcp -Use a simple tcp connect to check that hosts are up. +Use a simple TCP connect to check that hosts are up. .It Ic check icmp -Ping hosts in this table to determine wether they are up or not. -This method will automatically use icmp or icmpv6 depending on the +Ping hosts in this table to determine whether they are up or not. +This method will automatically use ICMP or ICMPV6 depending on the address family of each host. .It Ic check http Ar path Ic code Ar number For each host in the table, verify that retrieving the URL .Ar path gives the HTTP return code -.Ar number +.Ar number . .It Ic check http Ar path Ic digest Ar string For each host in the table, verify that retrieving the URL .Ar path produces a content whose SHA1 digest is .Ar digest . The digest does not take the HTTP headers into account. -To compute the digest you can use this simple command: -.Bd -literal -offset 2n +To compute the digest, use this simple command: +.Bd -literal -offset indent ftp -o - http://host[:port]/path | sha1 .Ed .Pp -This will give you a digest of the form -.Bd -literal -offset 2n +This gives a digest +that can be used as is in a digest statement: +.Bd -literal -offset indent a9993e36476816aba3e25717850c26c9cd0d89d .Ed -.Pp -that you can use as-is in your digest statement. .It Ic timeout Ar number Set the timeout in milliseconds for each host that is checked. The default timeout is 200 milliseconds. .It Ic real port Ar number -When using the tcp or http checking methods, use this port to connect +When using the TCP or HTTP checking methods, use this port to connect to hosts. This parameter is mandatory. Main and backup tables need to have the same real port. @@ -128,14 +124,15 @@ Add the host whose address is to the list of hosts to be checked in this table. Each table needs at least one host. .It Ic disable -Start the table disabled, no hosts will be checked in this table. +Start the table disabled \(en no hosts will be checked in this table. The table can be later enabled through .Xr hostatectl 8 . .El .Sh SERVICES Services represent a .Xr pf 4 -rdr rule, they are used to specify which addresses will be redirected +rdr rule. +They are used to specify which addresses will be redirected to the hosts in the specified tables. The configuration directives that are valid in this context are described below. @@ -143,12 +140,11 @@ below. .It Ic virtual ip Ar address Ic port Ar number Specify an address and a port that will be used to redirect requests to the hosts in the main or backup table. -Optionally an interface name can be specified like this. +Optionally an interface name can be given as follows, +to specify which interface the rdr rule will be enabled on: .Bd -literal -offset indent interface ``ifname'' .Ed -.Pp -to specify which interface the rdr rule will be enabled on. .It Ic table Ar name Specify the main table to be used. This is mandatory. @@ -158,18 +154,19 @@ are seen as down or disabled. .It Ic disable Set the service initially disabled. It can be later enabled through +.Xr hostatectl 8 . .It Ic tag Ar name Automatically tag packets passing through the .Xr pf 4 rdr rule with the name supplied. -This allows for easier filter rules in your main -.Xr pf 4 -configuration. -.Xr hostatectl 5 . +This allows simpler filter rules. .El .Sh EXAMPLE -This configuration file would create a service 'www' which load-balances -4 hosts and falls back to 1 host containing a ``sorry page'': +This configuration file would create a service +.Dq www +which load balances four hosts +and falls back to one host containing a +.Dq sorry page : .Bd -literal -offset indent ## ## @@ -214,5 +211,5 @@ service www { configuration file .El .Sh SEE ALSO -.Xr hostated 8 , -.Xr hostatectl 8 . +.Xr hostatectl 8 , +.Xr hostated 8 diff --git a/usr.sbin/hoststatectl/hoststatectl.8 b/usr.sbin/hoststatectl/hoststatectl.8 index c511bc9da66..af49ee1b338 100644 --- a/usr.sbin/hoststatectl/hoststatectl.8 +++ b/usr.sbin/hoststatectl/hoststatectl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hoststatectl.8,v 1.3 2006/12/16 18:50:33 reyk Exp $ +.\" $OpenBSD: hoststatectl.8,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> .\" @@ -33,19 +33,21 @@ daemon. .Pp The following commands are available: .Bl -tag -width Ds -.It Cm show -.It Cm show summary -Show status of services, tables and hosts. +.It Cm show Op Cm summary +Show status of services, tables, and hosts. +The keyword +.Cm summary +is optional. .It Cm service disable Op Ar name | id Disable a service. If it has .Xr pf 4 redirection rules installed, remove them. -Mark the service's main table and - -if applicable - backup table disabled as well. +Mark the service's main table and \(en +if applicable \(en backup table disabled as well. .It Cm service enable Op Ar name | id Enable a service. -Mark the service's main table and - if applicable - backup +Mark the service's main table and \(en if applicable \(en backup table enabled as well. .It Cm table disable Op Ar name | id Disable a table. @@ -72,5 +74,4 @@ Unix-domain socket used for communication with .Xr hostated 8 . .El .Sh SEE ALSO -.Xr hostated.conf 5 , .Xr hostated 8 diff --git a/usr.sbin/hoststated/hoststated.8 b/usr.sbin/hoststated/hoststated.8 index d7f7806b161..3bea663ae17 100644 --- a/usr.sbin/hoststated/hoststated.8 +++ b/usr.sbin/hoststated/hoststated.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hoststated.8,v 1.3 2006/12/16 12:42:14 reyk Exp $ +.\" $OpenBSD: hoststated.8,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> .\" @@ -27,55 +27,54 @@ .Sh DESCRIPTION .Nm is the host status daemon for server load balancing. -Its main purpose is to maintain pf tables up to date -as well as related pf rdr rules. -To communicate with +Its main purpose is to keep .Xr pf 4 +tables up to date +as well as any related pf rdr rules. +To communicate with pf, .Nm uses the anchor facility. To enable .Nm -to install rulesets through the anchor you will -need the following line in the NAT section of your -.Xr pf.conf 5 -configuration file: -.Bd -literal -offset 2n +to install rulesets through the anchor, +the following line is required in the NAT section of +.Xr pf.conf 5 : +.Bd -literal -offset indent rdr-anchor "hostated/*" .Ed .Pp .Nm -manipulates three data types: services, tables and hosts. +manipulates three data types: services, tables, and hosts. Each service represents a .Xr pf 4 rdr rule. -A service contains at least one table and one virtual ip which are +A service contains at least one table and one virtual IP which are used to create the proper rule. -Each table contains at least one host, and is mapped to a -.Xr pf 4 -table. -Additionnaly, a table can be backed up i.e its content will be swapped +Each table contains at least one host, and is mapped to a pf table. +Additionally a table can be backed up i.e. its content will be swapped by the content of another table when it is empty. This can be used to serve static content when a dynamic service goes down. See .Xr hostated.conf 5 for a more detailed explanation of how to configure -.Nm -. +.Nm . .Pp .Xr hostatectl 8 -can be used to enable or disable hosts, tables and services as well +can be used to enable or disable hosts, tables, and services as well as showing the current status of each object. .Pp The options are as follows: .Bl -tag -width Ds .It Fl d Do not daemonize. -If this options is specified, +If this option is specified, .Nm will run in the foreground and log to .Em stderr . .It Fl f Ar file -Specify an alternative configurate file. +Specify an alternative configuration file. +The default is +.Pa /etc/hostated.conf . .It Fl n Configtest mode. Only check the configuration file for validity. diff --git a/usr.sbin/hoststated/hoststated.conf.5 b/usr.sbin/hoststated/hoststated.conf.5 index ea3ecf75b0a..127cd12ff07 100644 --- a/usr.sbin/hoststated/hoststated.conf.5 +++ b/usr.sbin/hoststated/hoststated.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hoststated.conf.5,v 1.3 2006/12/16 12:42:14 reyk Exp $ +.\" $OpenBSD: hoststated.conf.5,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> .\" @@ -19,17 +19,14 @@ .Os .Sh NAME .Nm hostated.conf -.Nd Host Status daemon configuration file. +.Nd Host Status daemon configuration file .Sh DESCRIPTION -The -.Xr hostated 8 -daemon maintains -.Xr pf 4 -tables up to date. +.Nm +is the configuration file for the Host Status Daemon, +.Xr hostated 8 . .Sh SECTIONS -The .Nm -configuration file is divided into four main sections. +is divided into four main sections: .Bl -tag -width xxxx .It Sy Macros User-defined variables may be defined and used later, simplifying the @@ -87,38 +84,37 @@ Only one health-checking method can be used per table. Table specific configuration directives are described below. .Bl -tag -width Ds .It Ic check tcp -Use a simple tcp connect to check that hosts are up. +Use a simple TCP connect to check that hosts are up. .It Ic check icmp -Ping hosts in this table to determine wether they are up or not. -This method will automatically use icmp or icmpv6 depending on the +Ping hosts in this table to determine whether they are up or not. +This method will automatically use ICMP or ICMPV6 depending on the address family of each host. .It Ic check http Ar path Ic code Ar number For each host in the table, verify that retrieving the URL .Ar path gives the HTTP return code -.Ar number +.Ar number . .It Ic check http Ar path Ic digest Ar string For each host in the table, verify that retrieving the URL .Ar path produces a content whose SHA1 digest is .Ar digest . The digest does not take the HTTP headers into account. -To compute the digest you can use this simple command: -.Bd -literal -offset 2n +To compute the digest, use this simple command: +.Bd -literal -offset indent ftp -o - http://host[:port]/path | sha1 .Ed .Pp -This will give you a digest of the form -.Bd -literal -offset 2n +This gives a digest +that can be used as is in a digest statement: +.Bd -literal -offset indent a9993e36476816aba3e25717850c26c9cd0d89d .Ed -.Pp -that you can use as-is in your digest statement. .It Ic timeout Ar number Set the timeout in milliseconds for each host that is checked. The default timeout is 200 milliseconds. .It Ic real port Ar number -When using the tcp or http checking methods, use this port to connect +When using the TCP or HTTP checking methods, use this port to connect to hosts. This parameter is mandatory. Main and backup tables need to have the same real port. @@ -128,14 +124,15 @@ Add the host whose address is to the list of hosts to be checked in this table. Each table needs at least one host. .It Ic disable -Start the table disabled, no hosts will be checked in this table. +Start the table disabled \(en no hosts will be checked in this table. The table can be later enabled through .Xr hostatectl 8 . .El .Sh SERVICES Services represent a .Xr pf 4 -rdr rule, they are used to specify which addresses will be redirected +rdr rule. +They are used to specify which addresses will be redirected to the hosts in the specified tables. The configuration directives that are valid in this context are described below. @@ -143,12 +140,11 @@ below. .It Ic virtual ip Ar address Ic port Ar number Specify an address and a port that will be used to redirect requests to the hosts in the main or backup table. -Optionally an interface name can be specified like this. +Optionally an interface name can be given as follows, +to specify which interface the rdr rule will be enabled on: .Bd -literal -offset indent interface ``ifname'' .Ed -.Pp -to specify which interface the rdr rule will be enabled on. .It Ic table Ar name Specify the main table to be used. This is mandatory. @@ -158,18 +154,19 @@ are seen as down or disabled. .It Ic disable Set the service initially disabled. It can be later enabled through +.Xr hostatectl 8 . .It Ic tag Ar name Automatically tag packets passing through the .Xr pf 4 rdr rule with the name supplied. -This allows for easier filter rules in your main -.Xr pf 4 -configuration. -.Xr hostatectl 5 . +This allows simpler filter rules. .El .Sh EXAMPLE -This configuration file would create a service 'www' which load-balances -4 hosts and falls back to 1 host containing a ``sorry page'': +This configuration file would create a service +.Dq www +which load balances four hosts +and falls back to one host containing a +.Dq sorry page : .Bd -literal -offset indent ## ## @@ -214,5 +211,5 @@ service www { configuration file .El .Sh SEE ALSO -.Xr hostated 8 , -.Xr hostatectl 8 . +.Xr hostatectl 8 , +.Xr hostated 8 diff --git a/usr.sbin/relayctl/relayctl.8 b/usr.sbin/relayctl/relayctl.8 index 68ba60ffa02..6f9cfd22392 100644 --- a/usr.sbin/relayctl/relayctl.8 +++ b/usr.sbin/relayctl/relayctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: relayctl.8,v 1.3 2006/12/16 18:50:33 reyk Exp $ +.\" $OpenBSD: relayctl.8,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> .\" @@ -33,19 +33,21 @@ daemon. .Pp The following commands are available: .Bl -tag -width Ds -.It Cm show -.It Cm show summary -Show status of services, tables and hosts. +.It Cm show Op Cm summary +Show status of services, tables, and hosts. +The keyword +.Cm summary +is optional. .It Cm service disable Op Ar name | id Disable a service. If it has .Xr pf 4 redirection rules installed, remove them. -Mark the service's main table and - -if applicable - backup table disabled as well. +Mark the service's main table and \(en +if applicable \(en backup table disabled as well. .It Cm service enable Op Ar name | id Enable a service. -Mark the service's main table and - if applicable - backup +Mark the service's main table and \(en if applicable \(en backup table enabled as well. .It Cm table disable Op Ar name | id Disable a table. @@ -72,5 +74,4 @@ Unix-domain socket used for communication with .Xr hostated 8 . .El .Sh SEE ALSO -.Xr hostated.conf 5 , .Xr hostated 8 diff --git a/usr.sbin/relayd/relayd.8 b/usr.sbin/relayd/relayd.8 index 1997019152d..23c27d50376 100644 --- a/usr.sbin/relayd/relayd.8 +++ b/usr.sbin/relayd/relayd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: relayd.8,v 1.3 2006/12/16 12:42:14 reyk Exp $ +.\" $OpenBSD: relayd.8,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> .\" @@ -27,55 +27,54 @@ .Sh DESCRIPTION .Nm is the host status daemon for server load balancing. -Its main purpose is to maintain pf tables up to date -as well as related pf rdr rules. -To communicate with +Its main purpose is to keep .Xr pf 4 +tables up to date +as well as any related pf rdr rules. +To communicate with pf, .Nm uses the anchor facility. To enable .Nm -to install rulesets through the anchor you will -need the following line in the NAT section of your -.Xr pf.conf 5 -configuration file: -.Bd -literal -offset 2n +to install rulesets through the anchor, +the following line is required in the NAT section of +.Xr pf.conf 5 : +.Bd -literal -offset indent rdr-anchor "hostated/*" .Ed .Pp .Nm -manipulates three data types: services, tables and hosts. +manipulates three data types: services, tables, and hosts. Each service represents a .Xr pf 4 rdr rule. -A service contains at least one table and one virtual ip which are +A service contains at least one table and one virtual IP which are used to create the proper rule. -Each table contains at least one host, and is mapped to a -.Xr pf 4 -table. -Additionnaly, a table can be backed up i.e its content will be swapped +Each table contains at least one host, and is mapped to a pf table. +Additionally a table can be backed up i.e. its content will be swapped by the content of another table when it is empty. This can be used to serve static content when a dynamic service goes down. See .Xr hostated.conf 5 for a more detailed explanation of how to configure -.Nm -. +.Nm . .Pp .Xr hostatectl 8 -can be used to enable or disable hosts, tables and services as well +can be used to enable or disable hosts, tables, and services as well as showing the current status of each object. .Pp The options are as follows: .Bl -tag -width Ds .It Fl d Do not daemonize. -If this options is specified, +If this option is specified, .Nm will run in the foreground and log to .Em stderr . .It Fl f Ar file -Specify an alternative configurate file. +Specify an alternative configuration file. +The default is +.Pa /etc/hostated.conf . .It Fl n Configtest mode. Only check the configuration file for validity. diff --git a/usr.sbin/relayd/relayd.conf.5 b/usr.sbin/relayd/relayd.conf.5 index e8275a9b26b..6bcbd2cb034 100644 --- a/usr.sbin/relayd/relayd.conf.5 +++ b/usr.sbin/relayd/relayd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: relayd.conf.5,v 1.3 2006/12/16 12:42:14 reyk Exp $ +.\" $OpenBSD: relayd.conf.5,v 1.4 2006/12/18 19:48:04 jmc Exp $ .\" .\" Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> .\" @@ -19,17 +19,14 @@ .Os .Sh NAME .Nm hostated.conf -.Nd Host Status daemon configuration file. +.Nd Host Status daemon configuration file .Sh DESCRIPTION -The -.Xr hostated 8 -daemon maintains -.Xr pf 4 -tables up to date. +.Nm +is the configuration file for the Host Status Daemon, +.Xr hostated 8 . .Sh SECTIONS -The .Nm -configuration file is divided into four main sections. +is divided into four main sections: .Bl -tag -width xxxx .It Sy Macros User-defined variables may be defined and used later, simplifying the @@ -87,38 +84,37 @@ Only one health-checking method can be used per table. Table specific configuration directives are described below. .Bl -tag -width Ds .It Ic check tcp -Use a simple tcp connect to check that hosts are up. +Use a simple TCP connect to check that hosts are up. .It Ic check icmp -Ping hosts in this table to determine wether they are up or not. -This method will automatically use icmp or icmpv6 depending on the +Ping hosts in this table to determine whether they are up or not. +This method will automatically use ICMP or ICMPV6 depending on the address family of each host. .It Ic check http Ar path Ic code Ar number For each host in the table, verify that retrieving the URL .Ar path gives the HTTP return code -.Ar number +.Ar number . .It Ic check http Ar path Ic digest Ar string For each host in the table, verify that retrieving the URL .Ar path produces a content whose SHA1 digest is .Ar digest . The digest does not take the HTTP headers into account. -To compute the digest you can use this simple command: -.Bd -literal -offset 2n +To compute the digest, use this simple command: +.Bd -literal -offset indent ftp -o - http://host[:port]/path | sha1 .Ed .Pp -This will give you a digest of the form -.Bd -literal -offset 2n +This gives a digest +that can be used as is in a digest statement: +.Bd -literal -offset indent a9993e36476816aba3e25717850c26c9cd0d89d .Ed -.Pp -that you can use as-is in your digest statement. .It Ic timeout Ar number Set the timeout in milliseconds for each host that is checked. The default timeout is 200 milliseconds. .It Ic real port Ar number -When using the tcp or http checking methods, use this port to connect +When using the TCP or HTTP checking methods, use this port to connect to hosts. This parameter is mandatory. Main and backup tables need to have the same real port. @@ -128,14 +124,15 @@ Add the host whose address is to the list of hosts to be checked in this table. Each table needs at least one host. .It Ic disable -Start the table disabled, no hosts will be checked in this table. +Start the table disabled \(en no hosts will be checked in this table. The table can be later enabled through .Xr hostatectl 8 . .El .Sh SERVICES Services represent a .Xr pf 4 -rdr rule, they are used to specify which addresses will be redirected +rdr rule. +They are used to specify which addresses will be redirected to the hosts in the specified tables. The configuration directives that are valid in this context are described below. @@ -143,12 +140,11 @@ below. .It Ic virtual ip Ar address Ic port Ar number Specify an address and a port that will be used to redirect requests to the hosts in the main or backup table. -Optionally an interface name can be specified like this. +Optionally an interface name can be given as follows, +to specify which interface the rdr rule will be enabled on: .Bd -literal -offset indent interface ``ifname'' .Ed -.Pp -to specify which interface the rdr rule will be enabled on. .It Ic table Ar name Specify the main table to be used. This is mandatory. @@ -158,18 +154,19 @@ are seen as down or disabled. .It Ic disable Set the service initially disabled. It can be later enabled through +.Xr hostatectl 8 . .It Ic tag Ar name Automatically tag packets passing through the .Xr pf 4 rdr rule with the name supplied. -This allows for easier filter rules in your main -.Xr pf 4 -configuration. -.Xr hostatectl 5 . +This allows simpler filter rules. .El .Sh EXAMPLE -This configuration file would create a service 'www' which load-balances -4 hosts and falls back to 1 host containing a ``sorry page'': +This configuration file would create a service +.Dq www +which load balances four hosts +and falls back to one host containing a +.Dq sorry page : .Bd -literal -offset indent ## ## @@ -214,5 +211,5 @@ service www { configuration file .El .Sh SEE ALSO -.Xr hostated 8 , -.Xr hostatectl 8 . +.Xr hostatectl 8 , +.Xr hostated 8 |