1. Joe Heck
  2. superlance

Commits

Tres Seaver  committed 5743a64

[svn r968] Add crashmail docs.

  • Participants
  • Parent commits b91e564
  • Branches superlance

Comments (0)

Files changed (3)

File trunk/docs/crashmail.rst

View file
+:command:`crashmail` Documentation
+==================================
+
+Command-Line Syntax
+-------------------
+
+.. program:: crashmail
+
+.. cmdoption:: -p <process_name>
+   
+   Send mail when the specified :command:`supervisord` child process
+   transitions unexpectedly to the ``EXITED`` state.
+
+   This option may be specified more than once, allowing for specification
+   of multiple processes.
+   
+   To monitor a process which is part of a :command:`supervisord` group,
+   specify its name as ``process_name:group_name``.
+ 
+.. cmdoption:: -a
+   
+   Send mail when any :command:`supervisord` child process transitions
+   unexpectedly to the ``EXITED`` state.
+   
+   Overrides any ``-p`` parameters passed in the same :command:`crashmail`
+   process invocation.
+
+.. cmdoption:: -o
+   
+   Specify a parameter used as a prefix in the mail :mailheader:`Subject`
+   header.
+
+.. cmdoption:: -s
+   
+   Specify the sendmail command to use to send email.
+   
+   Must be a command which accepts header and message data on stdin and
+   sends mail.  Default is ``/usr/sbin/sendmail -t -i``.
+
+.. cmdoption:: -m
+   
+   Specify an email address to which crash notification messages are sent.
+   If no email address is specified, email will not be sent.
+
+
+Configuring :command:`crashmail` Into the Supervisor Config
+-----------------------------------------------------------
+
+An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
+in order for :command:`memmon` to do its work. See the "Events" chapter in the
+Supervisor manual for more information about event listeners.
+
+The following example assumes that :command:`crashmail` is on your system
+:envvar:`PATH`.
+
+.. code-block:: ini
+
+   [eventlistener:crashmail]
+   crashmail.py -p program1 -p group1:program2 -m dev@example.com
+   events=PROCESS_STATE_EXITED

File trunk/docs/index.rst

View file
 
 Currently, it provides three scripts:
 
-``httpok`` -- This script can be used as a supervisor event listener
-(subscribed to TICK events) which will restart a "hung" HTTP server
-process, which is defined as a process in the RUNNING state which does
-not respond in an appropriate or timely manner to an HTTP GET request.
+:command:`httpok`
+    This script is meant to be used as a supervisor event listener,
+    subscribed to ``TICK_*`` events.  It tests that a given child process
+    which must in the ``RUNNING`` state, is viable via an HTTP ``GET``
+    request to a configured URL.  If the request fails or times out,
+    :command:`httpok`` will restart the "hung" child process.
 
-``crashmail`` -- This script will email a user when a process enters
-the EXITED state unexpectedly.
+:command:`crashmail`
+    This script is meant to be used as a supervisor event listener,
+    subscribed to ``PROCESS_STATE_EXITED`` events.  It email a user when
+    a process enters the ``EXITED`` state unexpectedly.
 
-``memmon`` -- See the description below.
+:command:`memmon`
+    This script is meant to be used as a supervisor event listener
+    (subscribed to ``TICK_*`` events.
 
 
 Contents:
    :maxdepth: 2
 
    memmon
+   crashmail
 
 Indices and tables
 ==================

File trunk/docs/memmon.rst

View file
 in order for :command:`memmon` to do its work. See the "Events" chapter in the
 Supervisor manual for more information about event listeners.
 
-The following examples assume that the memmon is on your system :envvar:`PATH`.
+The following examples assume that :command:`memmon` is on your system
+:envvar:`PATH`.
 
 Example Configuration 1
 #######################