ldirectord8
Linux director daemon daemon to monitor remote services and control linux virtual server
Usage
ldirectord {[{-d | --debug}]
[--]
[configfile]
start | stop | restart | try-restart | reload | force-reload | status}
ldirectord [{-h | -? | --help | -v | --version}]
Description of how to write configuration files
virtual {=
(ip_address | hostname:portnumber | servicename) | firewall-mark}
checktimeout =
n
Default: 5
seconds
negotiatetimeout =
n
Default: 30
seconds
checkinterval =
n
Default: 10
seconds
checkcount =
n
Default: 1
failurecount =
n
Default: 1
autoreload {=
yes | no}
Default: no
callback =
"/path/to/callback"
fallback {=
ip_address | hostname
[{:portnumber | sercvicename}]
[{gate | masq | ipip}]}
fallbackcommand =
"path
to
script"
logfile {=
"/path/to/logfile" | syslog_facility}
Default: log
directly
to
the
file
/var/log/ldirectord.log.
emailalert =
"emailaddress
[,
emailaddress] ...
"
emailalertfrom =
emailaddress
emailalertfreq =
n
Default: 0
Default: all
smtp {=
ip_address | hostname"}
A valid
SMTP
server
address
to
use
for
sending
email
via
SMTP.
execute =
"configuration"
supervised {=
yes | no}
Default: no
fork {=
yes | no}
Default: no
quiescent {=
yes | no}
This side-effect
can
be
avoided
by
running
the
following:
echo 1
>
/proc/sys/net/ipv4/vs/expire_quiescent_template
Default: yes
readdquiescent {=
yes | no}
cleanstop {=
yes | no}
Default: yes
maintenancedir =
directoryname
Default: disabled
Section virtual
real {=
ip_address | hostname
[{->ip_address | hostname}]
[{:portnumber | servicename}]
gate | masq | ipip
[weight]
["request",
"receive"]
["<l:l-threshold>"]
["<u:u-threshold>"]}
More than one of these entries may be inside a virtual section. The checktimeout, negotiatetimeout, checkcount, fallback, emailalert, emailalertfreq and quiescent options listed above may also appear inside a virtual section, in which case the global setting is overridden.
checktype {=
connect | external | external-perl | negotiate | off | on | ping | checktimeoutN}
service {=
dns | ftp | http | https | http_proxy | imap | imaps | ldap | ldaps | mysql | nntp | none | oracle | pgsql | pop | pops | radius | simpletcp | sip | smtp | submission}
Default:
checkcommand =
"path
to
script"
Four parameters
are
passed
to
the
script:
Default: /bin/true
checkport =
n
Default: port
specified
for
each
real
server
request =
"uri
to
requested
object"
receive =
"regexp
to
compare"
httpmethod {=
GET | HEAD}
Default: GET
virtualhost =
"hostname"
login =
"username"
For RADIUS
the
username
is
used
for
the
attribute
User-Name.
Default:
passwd =
"password"
For RADIUS
the
passwd
is
used
for
the
attribute
User-Password.
Default:
database =
"databasename"
secret =
"radiussecret"
Default: empty
string
scheduler =
scheduler_name
Default: "wrr"
persistent =
n
netmask {=
w.x.y.z | prefixlen}
protocol {=
tcp | udp | fwm}
Default:
monitorfile =
"/path/to/monitorfile"
The log
format
is:
[{timestamp | pid | real_service_id | status | message}]
ops {=
yes | no}
servicename =
short
name
comment =
comment
Overview
ldirectord is a daemon to monitor and administer real servers in a cluster of load balanced virtual servers. ldirectord typically is started from heartbeat but can also be run from the command line. On startup ldirectord reads the file /etc/ha.d/conf/configuration. After parsing the file, entries for virtual servers are created on the LVS. Now at regular intervals the specified real servers are monitored and if they are considered alive, added to a list for each virtual server. If a real server fails, it is removed from that list. Only one instance of ldirectord can be started for each configuration, but more instances of ldirectord may be started for different configurations. This helps to group clusters of services. Normally one would put an entry inside /etc/ha.d/haresources
nodename virtual-ip-address ldirectord::configuration
to start ldirectord from heartbeat.
Options
configuration: This is the name for the configuration as specified in the file /etc/ha.d/conf/configuration
-d|--debug Don't start as daemon and log verbosely.
-h|--help Print user manual and exit.
-v|--version Print version and exit.
start the daemon for the specified configuration.
stop the daemon for the specified configuration. This is the same as sending a TERM signal to the running daemon.
restart the daemon for the specified configuration. The same as stopping and starting.
reload the configuration file. This is only useful for modifications inside a virtual server entry. It will have no effect on adding or removing a virtual server block. This is the same as sending a HUP signal to the running daemon.
status of the running daemon for the specified configuration.
IPv6
Directives for IPv6 are virtual6, real6, fallback6. IPv6 addresses specified for virtual6, real6, fallback6 and a file of maintenance directory should be enclosed by brackets ([2001:db8::abcd]:80).
Following checktype and service are supported.
checktype: connect | external | external-perl | negotiate | off | on | checktimeoutN
service: dns | http | https | nntp | none | simpletcp | sip
Note: When using a service type with http or https, you need to install perl module perl-Net-INET6Glue.
Files
/etc/ha.d/ldirectord.cf
/var/log/ldirectord.log
/var/run/ldirectord.configuration.pid
/etc/services
Releases
11 releases since Debian 3.1 (Sarge); the text changed 10 times.