summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2006-12-18 19:48:05 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2006-12-18 19:48:05 +0000
commit7852f6d632b42b88a5efea117e232537d62195be (patch)
tree94c6624bbd8d600fec444aee3ab755b3f70491f3 /usr.sbin/relayd
parent17ce0ab7b8daa07d5feae21242b94227d554cd50 (diff)
some initial improvements for the hostated pages;
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r--usr.sbin/relayd/relayd.839
-rw-r--r--usr.sbin/relayd/relayd.conf.563
2 files changed, 49 insertions, 53 deletions
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