SYNOPSIS
failsh [c community] [d facility] [f tclfile] [FV] [l logfile] [m
monitorport] [i pidfile] [D debugport]
DESCRIPTION
Failsh is a Tcl application that monitors services on remote hosts as
specified in the Tcl script feed to it. If no master host can provide
the service, and no slave does provide it, failsh will start the ser‐
vice on the local host and notify the other hosts through the failover
state daemon faild(l).
OPTIONS
ccommunity
Use community string community when accepting connections from
the faildebug(l) client. Note that this is set to public by
default, and as the faildebug(l) client uses the same default,
access is allowed by default. Explicitly set this parameter if
you want access control for debugging information. (There is a
slight chance that an attacker could mount a DoS attack if the
system does not have enough space to store the log information
generated.)
dfacility
Increment the log level for facility facility. Specifying this
option also means that the command stays in the foreground.
Changes at run time can be requested with the faildebug(l)
client, also see there for a list of available facilities. All
debug information is written to the daemon syslog facility.
ftclfile
Read the file tclfile an execute the commands in that file. This
paramater is mandatory, there is no other way to specify to
failsh what hosts and services it should monitor.
F Stay in foreground. By default, failsh goes to the background
when started without a debug option.
llogfile
When failsh receives the INT signal, it dumps its state to the
file logfile, or if this option is not specified, to
/var/tmp/failsh.dump. A FIFO can be specified for logfile, in
which case the output file is not closed after the state dump is
done. This can be useful when tracing the actions of failsh:
keep sending INT signals to the process through a shell command
like while sleep 1; do kill ‐INT ‘cat /var/run/failsh.pid‘; done
and keep reading (e.g. using cat) from the FIFO. An additional
benefit is that the file system containing the trace will neve
overflow because of failsh.
mmonitorport
When failsh starts up, it opens a port for monitor clients to
connect to. The default port number is 1848. This prevents inde‐
set up the debug service port on debugport, no service estab‐
lished if this argument is not specified.
V display failover version and exit.
TCL COMMANDS
Failsh adds three new Tcl command: failsvc, failhost and failtrap. The
failsvc command is used to create services, add masters and slaves to a
service, define the scripts that start and stop the service and to mod‐
ify the query interval. The syntax for all subcommands is
failsvc servicename subcommand parameters
The following subcommands are understood:
interval interval
set the query interval to interval.
masters master1 [...]
Set the list of masters for the service to host names specified
as arguments.
slaves slave1 [...]
Set the list of slaves for the service to host names specified
as arguments.
start startproc
Set the start procedure for the service to startproc.
stop stopproc
Set the stop procedure for the service to stopproc.
reclaim reclaimproc
Set the reclaim procedure for the service to reclaimproc.
nonlocal
The keyword nonlocal indicates that this service is completely
nonlocal, i. e. the local faild does not announce this service.
This also means that there is no local state, on no method to
start and stop the service locally. Specifying the startproc or
stopproc parameters is therefore not necessary. This allows to
set up a failsh as monitor server, it only polls the real
servers and asks about their state. This reduces the load a mon‐
itor client generates on the failsh, only the monitoring faild
is affected.
The failhost command is used to modify host specific parameters. The
following subcommands may be used:
protocol {udp|tcp}
defines the protocol to be used for connections on a per host
The failtrap command is used to set the SNMP parameters so that traps
can be sent to a network management system. The failtrap command
understands the following subcommands:
host trapserver
If the trap host ist set using this command, traps are sent on
every state change.
port port
Traps are not sent to the standard port 162, but to the port
port.
enterprise number
Do not use the standard enterprise number assigned by IANA but
our own enterprise number number. The IANA‐assigned enterprise
number is 4263.
prefix prefixstring
Usually a prefix using the enterprise number is created as the
prefix for the SNMP object ids, this command allows to reset the
prefix to prefixstring. The default prefix is therefore
1.3.6.1.4.1.4263.1.2.1. This matches the MIB definitions given
in failover.mib.
community communitystring
Some systems only accept authenticated traps, this command sets
the community name to communitystring instead of the default
public.
SIGNALS
INT Write a dump of the data structures to /var/tmp/failsh.dump or
to the file specified with the l option.
TERM Sending the TERM signal lets failsh cleanly terminate.
FILES
/var/run/failsh.pid
contains the process id (pid).
/var/tmp/failsh.dump
A state dump is written to this file when failsh(l) receives an
INT signal.
LICENSE
This software is free software distributed under the terms of the GNU
GPL. There is, however, one restriction: this software may not be
ported to a Microsoft operating system of the windows family.
VERSION
This page documents failsh as it appears in version 0.5.16 of the
failover utilities.
Man(1) output converted with
man2html