Skip to content
Browse files

Updated documentation

  • Loading branch information...
1 parent df863a3 commit 37eb37ff7e7fa303708c8ee89261366febd9fbd7 Roger Hoover committed
Showing with 74 additions and 3 deletions.
  1. +4 −0 CHANGES.txt
  2. +7 −2 docs/crashmailbatch.rst
  3. +62 −0 docs/crashsms.rst
  4. +1 −1 superlance/crashmailbatch.py
View
4 CHANGES.txt
@@ -21,6 +21,10 @@ Next Release
- Add ``smtpHost`` command line flag to ``mailbatch`` processors.
+- Added ``crashsms`` from Juan Batiz-Benet
+
+- Converted ``crashmailbatch`` and friends from camel case to pythonic style
+
0.5 (2009-05-24)
---------------
View
9 docs/crashmailbatch.rst
@@ -21,7 +21,8 @@ Command-Line Syntax
.. code-block:: sh
$ crashmailbatch --toEmail=<email address> --fromEmail=<email address> \
- [--interval=<batch interval in minutes>] [--subject=<email subject>]
+ [--interval=<batch interval in minutes>] [--subject=<email subject>] \
+ [--tickEvent=<event name>]
.. program:: crashmailbatch
@@ -36,12 +37,16 @@ Command-Line Syntax
.. cmdoption:: -i <interval>, --interval=<interval>
Specify the time interval in minutes to use for batching notifcations.
- Defaults to 1 minute.
+ Defaults to 1.0 minute.
.. cmdoption:: -s <email subject>, --subject=<email subject>
Override the email subject line. Defaults to "Crash alert from supervisord"
+.. cmdoption:: -e <event name>, --tickEvent=<event name>
+
+ Override the TICK event name. Defaults to "TICK_60"
+
Configuring :command:`crashmailbatch` Into the Supervisor Config
-----------------------------------------------------------
View
62 docs/crashsms.rst
@@ -0,0 +1,62 @@
+:command:`crashsms` Documentation
+==================================
+
+:command:`crashsms` is a supervisor "event listener", intended to be
+subscribed to ``PROCESS_STATE`` events and ``TICK`` events such as ``TICK_60``. It monitors
+all processes running under a given supervisord instance.
+
+Similar to :command:`crashmailbash`, :command:`crashsms` sends SMS alerts
+through an email gateway. Messages are formatted to fit in SMS
+
+:command:`crashsms` is a "console script" installed when you install
+:mod:`superlance`. Although :command:`crashsms` is an executable
+program, it isn't useful as a general-purpose script: it must be run as a
+:command:`supervisor` event listener to do anything useful.
+
+Command-Line Syntax
+-------------------
+
+.. code-block:: sh
+
+ $ crashsms --toEmail=<email address> --fromEmail=<email address> \
+ [--interval=<batch interval in minutes>] [--subject=<email subject>] \
+ [--tickEvent=<event name>]
+
+.. program:: crashsms
+
+.. cmdoption:: -t <destination email>, --toEmail=<destination email>
+
+ Specify an email address to which crash notification messages are sent.
+
+.. cmdoption:: -f <source email>, --fromEmail=<source email>
+
+ Specify an email address from which crash notification messages are sent.
+
+.. cmdoption:: -i <interval>, --interval=<interval>
+
+ Specify the time interval in minutes to use for batching notifcations.
+ Defaults to 1.0 minute.
+
+.. cmdoption:: -s <email subject>, --subject=<email subject>
+
+ Set the email subject line. Default is None
+
+.. cmdoption:: -e <event name>, --tickEvent=<event name>
+
+ Override the TICK event name. Defaults to "TICK_60"
+
+Configuring :command:`crashsms` Into the Supervisor Config
+-----------------------------------------------------------
+
+An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
+in order for :command:`crashsms` to do its work. See the "Events" chapter in
+the Supervisor manual for more information about event listeners.
+
+The following example assumes that :command:`crashsms` is on your system
+:envvar:`PATH`.
+
+.. code-block:: ini
+
+ [eventlistener:crashsms]
+ crashsms --toEmail="<mobile number>@<sms email gateway>" --fromEmail="supervisord@fubar.com"
+ events=PROCESS_STATE,TICK_60
View
2 superlance/crashmailbatch.py
@@ -33,7 +33,7 @@
Options:
---interval - batch cycle length (in minutes). The default is 1 minute.
+--interval - batch cycle length (in minutes). The default is 1.0 minute.
This means that all events in each cycle are batched together
and sent as a single email

0 comments on commit 37eb37f

Please sign in to comment.
Something went wrong with that request. Please try again.