Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MONITORD(8)		    System Manager's Manual		   MONITORD(8)

NAME
       monitord	-- monitor system services for accidental termination

SYNOPSIS
       monitord	[-f file -t interval]

DESCRIPTION
       monitord	 is  a	simple to use system service that allows one to	easily
       monitor other system services for accidental termination. If they  ter-
       minate  because	of some	internal bug or	illegitimate action, such as a
       DoS attack, they	are restarted with the given username  and  parameters
       specified in monitord.conf.

       The two command line options are	as follows:

       -f file	   A  custom configuration file	may be used instead of the de-
		   fault one: /usr/local/etc/monitord.conf.

       -t interval
		   The time interval in	seconds	at which to check  the	system
		   processes,  which  are configured in	monitord.conf. The de-
		   fault interval is 10	seconds.

       The configuration file for monitord, /usr/local/etc/monitord.conf,  has
       a  simple format. It is divided into two	parts. The first part contains
       general configuration informaion, which for now consists	simply of  the
       admin's email and your email server. The	second part consists of	multi-
       ple  configuration lines	for each service to be monitored. In this sec-
       ond part, the first column contains the	user  under  which  the	 given
       service on that line will be run	if it needs to be restarted. The group
       to which	the user belongs will be grabbed from the password database.

       The second column consists of the options to be used in monitoring that
       particular service. Currently, three options are	supported:

       auto	   Indicates   that   the   service  should  be	 automatically
		   restarted if	it's found down. This is also the default  be-
		   haviour when	neither	auto nor noauto	are specified.

       noauto	   Indicates  that  the	 service  should  not be automatically
		   restarted if	it's down.

       alert	   Indicates that if this service is found down, the  adminis-
		   trator is automatically notified via	email, as specified in
		   the first part of the configuration file. Also, once	a ser-
		   vice	 is restarted, this option will	prompt monitord	to no-
		   tify	the administrator that it was successfully restarted.

       The third column	is the delay that will follow the startup of that par-
       ticular service.	Some services take a while to start up,	especially  if
       they  need to perform preperatory tasks in a wrapper script, so to keep
       monitord	from attempting	to restart a service after it's	already	 begun
       its  startup  proceedure	but before it appears in the process table the
       specified delay keeps monitord from checking that service for the spec-
       ified time in seconds.

       The fourth and fifth columns are	the service being monitored and	script
       used to start the service, respectively.	Only  the  script  column  in-
       cludes  the  full  path.	If no special wrapper script is	being used but
       instead the service's binary is invoked	directly  simply  include  the
       path  to	the service in the script column. The service field should al-
       ways contain the	name of	the binary being  executed.  See  examples  in
       monitord.conf.

       The  last  column,  which  is optional, may contain any parameters that
       should be passed	to the script (or binary as the	case may be). For  in-
       stance,	the  following	line  would  configure	monitord  to watch for
       sendmail(8) and restart it, in case of termination, with	the user  root
       and  group  wheel (which	it would grab from the password	database), and
       then notify the administrator.  monitord	will wait 30 seconds after at-
       tempting	to restart sendmail before it checks to	see if sendmail	is  up
       and running:

       root    auto,alert      30      sendmail	       /usr/sbin/sendmail -bd -q60m

EXAMPLES
       Here are	a few more example service entries:

       root    auto,alert      30      syslogd	       /usr/sbin/inetd	      -wW
       root    auto,alert      30      syslogd	       /usr/sbin/syslogd
       www     auto,alert      60      httpd	       /usr/local/etc/rc.d/apache.sh

IMPLEMENTATION NOTES
       This is version 0.4.1.

       When  using a time interval that	is smaller than	5 seconds, an increas-
       ingly larger amount of CPU time will be used by the process. It is rec-
       ommended	that one keep the interval equal to or above  5	 seconds.  The
       default of 10 seconds may be changed in config.h	before compile time.

FILES
       /usr/local/etc/monitord.conf  configuration file

DIAGNOSTICS
       When  restarting	a service which	it is monitoring, monitord will	notify
       syslogd(8) of the event.

       monitord	should be run as root so that it can restart the  services  it
       is monitoring with the correct username and group.

AUTHOR
       This manual page	was written by W. M. Shandruk <walt@erudition.net>.

BUGS
       There are no known bugs.

FreeBSD	4.3			August 21, 2003			   MONITORD(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=monitord&sektion=8&manpath=FreeBSD+Ports+14.3.quarterly>

home | help