superguard 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. superguard-0.0.3/CHANGES.md +9 -0
  2. superguard-0.0.3/COPYRIGHT.txt +19 -0
  3. superguard-0.0.3/LICENSE.txt +53 -0
  4. superguard-0.0.3/MANIFEST.in +8 -0
  5. superguard-0.0.3/PKG-INFO +68 -0
  6. superguard-0.0.3/README.rst +7 -0
  7. superguard-0.0.3/docs/Makefile +89 -0
  8. superguard-0.0.3/docs/conf.py +201 -0
  9. superguard-0.0.3/docs/crashmail.rst +78 -0
  10. superguard-0.0.3/docs/crashmailbatch.rst +82 -0
  11. superguard-0.0.3/docs/crashsms.rst +62 -0
  12. superguard-0.0.3/docs/development.rst +42 -0
  13. superguard-0.0.3/docs/fatalmailbatch.rst +61 -0
  14. superguard-0.0.3/docs/httpok.rst +151 -0
  15. superguard-0.0.3/docs/index.rst +61 -0
  16. superguard-0.0.3/docs/memmon.rst +221 -0
  17. superguard-0.0.3/setup.cfg +7 -0
  18. superguard-0.0.3/setup.py +93 -0
  19. superguard-0.0.3/superguard/__init__.py +1 -0
  20. superguard-0.0.3/superguard/compat.py +26 -0
  21. superguard-0.0.3/superguard/crashmail.py +193 -0
  22. superguard-0.0.3/superguard/crashmailbatch.py +60 -0
  23. superguard-0.0.3/superguard/crashsms.py +65 -0
  24. superguard-0.0.3/superguard/fatalmailbatch.py +57 -0
  25. superguard-0.0.3/superguard/httpok.py +452 -0
  26. superguard-0.0.3/superguard/memmon.py +515 -0
  27. superguard-0.0.3/superguard/process_state_email_monitor.py +200 -0
  28. superguard-0.0.3/superguard/process_state_monitor.py +104 -0
  29. superguard-0.0.3/superguard/tests/__init__.py +0 -0
  30. superguard-0.0.3/superguard/tests/dummy.py +96 -0
  31. superguard-0.0.3/superguard/tests/test_crashmail.py +79 -0
  32. superguard-0.0.3/superguard/tests/test_crashmailbatch.py +76 -0
  33. superguard-0.0.3/superguard/tests/test_crashsms.py +17 -0
  34. superguard-0.0.3/superguard/tests/test_fatalmailbatch.py +54 -0
  35. superguard-0.0.3/superguard/tests/test_httpok.py +470 -0
  36. superguard-0.0.3/superguard/tests/test_memmon.py +407 -0
  37. superguard-0.0.3/superguard/tests/test_process_state_email_monitor.py +171 -0
  38. superguard-0.0.3/superguard/tests/test_process_state_monitor.py +113 -0
  39. superguard-0.0.3/superguard/timeoutconn.py +44 -0
  40. superguard-0.0.3/superguard.egg-info/PKG-INFO +68 -0
  41. superguard-0.0.3/superguard.egg-info/SOURCES.txt +45 -0
  42. superguard-0.0.3/superguard.egg-info/dependency_links.txt +1 -0
  43. superguard-0.0.3/superguard.egg-info/entry_points.txt +7 -0
  44. superguard-0.0.3/superguard.egg-info/not-zip-safe +1 -0
  45. superguard-0.0.3/superguard.egg-info/requires.txt +5 -0
  46. superguard-0.0.3/superguard.egg-info/top_level.txt +1 -0
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.0.2 (2026-07-15)
4
+ - Add changes from superlance main from commit=ab1b8a5f8d5b0c6eb223f45cc483d582f76c315a to commit=ebde11bd8b571196382ca5bbae10be1ea465d17d
5
+
6
+ ## 0.0.1 (2026-07-15)
7
+ - Initial version
8
+ - Forked from superlance 2.0.0, renamed to superguard
9
+ - Support Python 2.7, 3.4+
@@ -0,0 +1,19 @@
1
+ Superlance is Copyright (c) 2008-2013 Agendaless Consulting and Contributors.
2
+ (http://www.agendaless.com), All Rights Reserved
3
+
4
+ This software is subject to the provisions of the license at
5
+ http://www.repoze.org/LICENSE.txt . A copy of this license should
6
+ accompany this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND
7
+ ANY AND ALL EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING,
8
+ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
9
+ MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS FOR A PARTICULAR
10
+ PURPOSE.
11
+
12
+ ---
13
+
14
+ Superguard is Copyright (c) 2025-present Superguard Contributors.
15
+ All Rights Reserved.
16
+
17
+ Superguard is a derivative work of superlance, substantially modified
18
+ and extended. This software is subject to the same license terms as
19
+ superlance (see LICENSE.txt).
@@ -0,0 +1,53 @@
1
+ Superguard is derived from superlance (https://github.com/Supervisor/superlance)
2
+ and is licensed under the same terms. The original license is reproduced below.
3
+
4
+ ======================================================================
5
+ Original superlance License
6
+ ======================================================================
7
+
8
+ Superlance is licensed under the following license:
9
+
10
+ A copyright notice accompanies this license document that identifies
11
+ the copyright holders.
12
+
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are
15
+ met:
16
+
17
+ 1. Redistributions in source code must retain the accompanying
18
+ copyright notice, this list of conditions, and the following
19
+ disclaimer.
20
+
21
+ 2. Redistributions in binary form must reproduce the accompanying
22
+ copyright notice, this list of conditions, and the following
23
+ disclaimer in the documentation and/or other materials provided
24
+ with the distribution.
25
+
26
+ 3. Names of the copyright holders must not be used to endorse or
27
+ promote products derived from this software without prior
28
+ written permission from the copyright holders.
29
+
30
+ 4. If any files are modified, you must cause the modified files to
31
+ carry prominent notices stating that you changed the files and
32
+ the date of any change.
33
+
34
+ Disclaimer
35
+
36
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND
37
+ ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
38
+ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
39
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
40
+ HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
41
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
42
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
43
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
44
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
45
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
46
+ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47
+ SUCH DAMAGE.
48
+
49
+ ======================================================================
50
+ Superguard
51
+ ======================================================================
52
+
53
+ Superguard is licensed under the same terms as superlance (above).
@@ -0,0 +1,8 @@
1
+ include CHANGES.md
2
+ include COPYRIGHT.txt
3
+ include LICENSE.txt
4
+ include README.rst
5
+ include docs/Makefile
6
+ recursive-include docs *.py *.rst
7
+ recursive-exclude docs/_build *
8
+
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: superguard
3
+ Version: 0.0.3
4
+ Summary: Modern health check and process monitoring toolkit for supervisord
5
+ Home-page: https://github.com/daqianai/superguard
6
+ Author: Superguard Contributors
7
+ Author-email: wcxontheway@126.com
8
+ License: BSD-derived (http://www.repoze.org/LICENSE.txt)
9
+ Keywords: supervisor monitoring health-check process-management
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: No Input/Output (Daemon)
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Programming Language :: Python :: 2
16
+ Classifier: Programming Language :: Python :: 2.7
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.4
19
+ Classifier: Programming Language :: Python :: 3.5
20
+ Classifier: Programming Language :: Python :: 3.6
21
+ Classifier: Programming Language :: Python :: 3.7
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Programming Language :: Python :: 3.14
29
+ Classifier: Topic :: System :: Boot
30
+ Classifier: Topic :: System :: Monitoring
31
+ Classifier: Topic :: System :: Systems Administration
32
+ Description-Content-Type: text/x-rst
33
+ License-File: LICENSE.txt
34
+ Requires-Dist: supervisor
35
+ Provides-Extra: test
36
+ Requires-Dist: pytest; extra == "test"
37
+ Requires-Dist: mock; extra == "test"
38
+ Dynamic: author
39
+ Dynamic: author-email
40
+ Dynamic: classifier
41
+ Dynamic: description
42
+ Dynamic: description-content-type
43
+ Dynamic: home-page
44
+ Dynamic: keywords
45
+ Dynamic: license
46
+ Dynamic: license-file
47
+ Dynamic: provides-extra
48
+ Dynamic: requires-dist
49
+ Dynamic: summary
50
+
51
+ superguard README
52
+ =================
53
+
54
+ Superguard is a package of plugin utilities for monitoring and controlling
55
+ processes that run under `supervisor <http://supervisord.org>`_.
56
+
57
+ Please see ``docs/index.rst`` for complete documentation.
58
+
59
+
60
+ # Changelog
61
+
62
+ ## 0.0.2 (2026-07-15)
63
+ - Add changes from superlance main from commit=ab1b8a5f8d5b0c6eb223f45cc483d582f76c315a to commit=ebde11bd8b571196382ca5bbae10be1ea465d17d
64
+
65
+ ## 0.0.1 (2026-07-15)
66
+ - Initial version
67
+ - Forked from superlance 2.0.0, renamed to superguard
68
+ - Support Python 2.7, 3.4+
@@ -0,0 +1,7 @@
1
+ superguard README
2
+ =================
3
+
4
+ Superguard is a package of plugin utilities for monitoring and controlling
5
+ processes that run under `supervisor <http://supervisord.org>`_.
6
+
7
+ Please see ``docs/index.rst`` for complete documentation.
@@ -0,0 +1,89 @@
1
+ # Makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ PAPER =
8
+ BUILDDIR = _build
9
+
10
+ # Internal variables.
11
+ PAPEROPT_a4 = -D latex_paper_size=a4
12
+ PAPEROPT_letter = -D latex_paper_size=letter
13
+ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14
+
15
+ .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
16
+
17
+ help:
18
+ @echo "Please use \`make <target>' where <target> is one of"
19
+ @echo " html to make standalone HTML files"
20
+ @echo " dirhtml to make HTML files named index.html in directories"
21
+ @echo " pickle to make pickle files"
22
+ @echo " json to make JSON files"
23
+ @echo " htmlhelp to make HTML files and a HTML help project"
24
+ @echo " qthelp to make HTML files and a qthelp project"
25
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26
+ @echo " changes to make an overview of all changed/added/deprecated items"
27
+ @echo " linkcheck to check all external links for integrity"
28
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
29
+
30
+ clean:
31
+ -rm -rf $(BUILDDIR)/*
32
+
33
+ html:
34
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
35
+ @echo
36
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
37
+
38
+ dirhtml:
39
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
40
+ @echo
41
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
42
+
43
+ pickle:
44
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
45
+ @echo
46
+ @echo "Build finished; now you can process the pickle files."
47
+
48
+ json:
49
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
50
+ @echo
51
+ @echo "Build finished; now you can process the JSON files."
52
+
53
+ htmlhelp:
54
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
55
+ @echo
56
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
57
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
58
+
59
+ qthelp:
60
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
61
+ @echo
62
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
63
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
64
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/superguard.qhcp"
65
+ @echo "To view the help file:"
66
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/superguard.qhc"
67
+
68
+ latex:
69
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
70
+ @echo
71
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
72
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
73
+ "run these through (pdf)latex."
74
+
75
+ changes:
76
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
77
+ @echo
78
+ @echo "The overview file is in $(BUILDDIR)/changes."
79
+
80
+ linkcheck:
81
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
82
+ @echo
83
+ @echo "Link check complete; look for any errors in the above output " \
84
+ "or in $(BUILDDIR)/linkcheck/output.txt."
85
+
86
+ doctest:
87
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
88
+ @echo "Testing of doctests in the sources finished, look at the " \
89
+ "results in $(BUILDDIR)/doctest/output.txt."
@@ -0,0 +1,201 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # superguard documentation build configuration file, created by
4
+ # sphinx-quickstart on Thu Jun 10 11:55:43 2010.
5
+ #
6
+ # This file is execfile()d with the current directory set to its containing dir.
7
+ #
8
+ # Note that not all possible configuration values are present in this
9
+ # autogenerated file.
10
+ #
11
+ # All configuration values have a default; values that are commented out
12
+ # serve to show the default.
13
+
14
+ import sys, os
15
+
16
+ # If extensions (or modules to document with autodoc) are in another directory,
17
+ # add these directories to sys.path here. If the directory is relative to the
18
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
19
+ # sys.path.append(os.path.abspath('.'))
20
+
21
+ # -- General configuration -----------------------------------------------------
22
+
23
+ # Add any Sphinx extension module names here, as strings. They can be extensions
24
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
25
+ extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest"]
26
+
27
+ # Add any paths that contain templates here, relative to this directory.
28
+ templates_path = ["_templates"]
29
+
30
+ # The suffix of source filenames.
31
+ source_suffix = ".rst"
32
+
33
+ # The encoding of source files.
34
+ # source_encoding = 'utf-8'
35
+
36
+ # The master toctree document.
37
+ master_doc = "index"
38
+
39
+ # General information about the project.
40
+ project = "superguard"
41
+ copyright = (
42
+ "2008-2013 Agendaless Consulting, Inc. | 2025-present Superguard Contributors"
43
+ )
44
+
45
+ # The version info for the project you're documenting, acts as replacement for
46
+ # |version| and |release|, also used in various other places throughout the
47
+ # built documents.
48
+ #
49
+ # The short X.Y version.
50
+ version = "0.0.3"
51
+ # The full version, including alpha/beta/rc tags.
52
+ release = version
53
+
54
+ # The language for content autogenerated by Sphinx. Refer to documentation
55
+ # for a list of supported languages.
56
+ # language = None
57
+
58
+ # There are two options for replacing |today|: either, you set today to some
59
+ # non-false value, then it is used:
60
+ # today = ''
61
+ # Else, today_fmt is used as the format for a strftime call.
62
+ # today_fmt = '%B %d, %Y'
63
+
64
+ # List of documents that shouldn't be included in the build.
65
+ # unused_docs = []
66
+
67
+ # List of directories, relative to source directory, that shouldn't be searched
68
+ # for source files.
69
+ exclude_trees = ["_build"]
70
+
71
+ # The reST default role (used for this markup: `text`) to use for all documents.
72
+ # default_role = None
73
+
74
+ # If true, '()' will be appended to :func: etc. cross-reference text.
75
+ # add_function_parentheses = True
76
+
77
+ # If true, the current module name will be prepended to all description
78
+ # unit titles (such as .. function::).
79
+ # add_module_names = True
80
+
81
+ # If true, sectionauthor and moduleauthor directives will be shown in the
82
+ # output. They are ignored by default.
83
+ # show_authors = False
84
+
85
+ # The name of the Pygments (syntax highlighting) style to use.
86
+ pygments_style = "sphinx"
87
+
88
+ # A list of ignored prefixes for module index sorting.
89
+ # modindex_common_prefix = []
90
+
91
+
92
+ # -- Options for HTML output ---------------------------------------------------
93
+
94
+ # The theme to use for HTML and HTML Help pages. Major themes that come with
95
+ # Sphinx are currently 'default' and 'sphinxdoc'.
96
+ html_theme = "default"
97
+
98
+ # Theme options are theme-specific and customize the look and feel of a theme
99
+ # further. For a list of options available for each theme, see the
100
+ # documentation.
101
+ # html_theme_options = {}
102
+
103
+ # Add any paths that contain custom themes here, relative to this directory.
104
+ # html_theme_path = []
105
+
106
+ # The name for this set of Sphinx documents. If None, it defaults to
107
+ # "<project> v<release> documentation".
108
+ # html_title = None
109
+
110
+ # A shorter title for the navigation bar. Default is the same as html_title.
111
+ # html_short_title = None
112
+
113
+ # The name of an image file (relative to this directory) to place at the top
114
+ # of the sidebar.
115
+ # html_logo = None
116
+
117
+ # The name of an image file (within the static path) to use as favicon of the
118
+ # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
119
+ # pixels large.
120
+ # html_favicon = None
121
+
122
+ # Add any paths that contain custom static files (such as style sheets) here,
123
+ # relative to this directory. They are copied after the builtin static files,
124
+ # so a file named "default.css" will overwrite the builtin "default.css".
125
+ # html_static_path = ['_static']
126
+
127
+ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
128
+ # using the given strftime format.
129
+ # html_last_updated_fmt = '%b %d, %Y'
130
+
131
+ # If true, SmartyPants will be used to convert quotes and dashes to
132
+ # typographically correct entities.
133
+ # html_use_smartypants = True
134
+
135
+ # Custom sidebar templates, maps document names to template names.
136
+ # html_sidebars = {}
137
+
138
+ # Additional templates that should be rendered to pages, maps page names to
139
+ # template names.
140
+ # html_additional_pages = {}
141
+
142
+ # If false, no module index is generated.
143
+ # html_use_modindex = True
144
+
145
+ # If false, no index is generated.
146
+ # html_use_index = True
147
+
148
+ # If true, the index is split into individual pages for each letter.
149
+ # html_split_index = False
150
+
151
+ # If true, links to the reST sources are added to the pages.
152
+ # html_show_sourcelink = True
153
+
154
+ # If true, an OpenSearch description file will be output, and all pages will
155
+ # contain a <link> tag referring to it. The value of this option must be the
156
+ # base URL from which the finished HTML is served.
157
+ # html_use_opensearch = ''
158
+
159
+ # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
160
+ # html_file_suffix = ''
161
+
162
+ # Output file base name for HTML help builder.
163
+ htmlhelp_basename = "superguarddoc"
164
+
165
+
166
+ # -- Options for LaTeX output --------------------------------------------------
167
+
168
+ # The paper size ('letter' or 'a4').
169
+ # latex_paper_size = 'letter'
170
+
171
+ # The font size ('10pt', '11pt' or '12pt').
172
+ # latex_font_size = '10pt'
173
+
174
+ # Grouping the document tree into LaTeX files. List of tuples
175
+ # (source start file, target name, title, author, documentclass [howto/manual]).
176
+ latex_documents = [
177
+ (
178
+ "index",
179
+ "superguard.tex",
180
+ "superguard Documentation",
181
+ "Superguard Contributors",
182
+ "manual",
183
+ ),
184
+ ]
185
+
186
+ # The name of an image file (relative to this directory) to place at the top of
187
+ # the title page.
188
+ # latex_logo = None
189
+
190
+ # For "manual" documents, if this is true, then toplevel headings are parts,
191
+ # not chapters.
192
+ # latex_use_parts = False
193
+
194
+ # Additional stuff for the LaTeX preamble.
195
+ # latex_preamble = ''
196
+
197
+ # Documents to append as an appendix to all manuals.
198
+ # latex_appendices = []
199
+
200
+ # If false, no module index is generated.
201
+ # latex_use_modindex = True
@@ -0,0 +1,78 @@
1
+ :command:`crashmail` Documentation
2
+ ==================================
3
+
4
+ :command:`crashmail` is a supervisor "event listener", intended to be
5
+ subscribed to ``PROCESS_STATE_EXITED`` events. When :command:`crashmail`
6
+ receives that event, and the transition is "unexpected", :command:`crashmail`
7
+ sends an email notification to a configured address.
8
+
9
+ :command:`crashmail` is incapable of monitoring the process status of processes
10
+ which are not :command:`supervisord` child processes.
11
+
12
+ :command:`crashmail` is a "console script" installed when you install
13
+ :mod:`superguard`. Although :command:`crashmail` is an executable program, it
14
+ isn't useful as a general-purpose script: it must be run as a
15
+ :command:`supervisor` event listener to do anything useful.
16
+
17
+ Command-Line Syntax
18
+ -------------------
19
+
20
+ .. code-block:: sh
21
+
22
+ $ crashmail [-p processname] [-a] [-o string] [-m mail_address] \
23
+ [-s sendmail]
24
+
25
+ .. program:: crashmail
26
+
27
+ .. cmdoption:: -p <process_name>, --program=<process_name>
28
+
29
+ Send mail when the specified :command:`supervisord` child process
30
+ transitions unexpectedly to the ``EXITED`` state.
31
+
32
+ This option can be provided more than once to have :command:`crashmail`
33
+ monitor more than one program.
34
+
35
+ To monitor a process which is part of a :command:`supervisord` group,
36
+ specify its name as ``group_name:process_name``.
37
+
38
+ .. cmdoption:: -a, --any
39
+
40
+ Send mail when any :command:`supervisord` child process transitions
41
+ unexpectedly to the ``EXITED`` state.
42
+
43
+ Overrides any ``-p`` parameters passed in the same :command:`crashmail`
44
+ process invocation.
45
+
46
+ .. cmdoption:: -o <prefix>, --optionalheader=<prefix>
47
+
48
+ Specify a parameter used as a prefix in the mail :mailheader:`Subject`
49
+ header.
50
+
51
+ .. cmdoption:: -s <sendmail_command>, --sendmail_program=<sendmail_command>
52
+
53
+ Specify the sendmail command to use to send email.
54
+
55
+ Must be a command which accepts header and message data on stdin and
56
+ sends mail. Default is ``/usr/sbin/sendmail -t -i``.
57
+
58
+ .. cmdoption:: -m <email_address>, --email=<email_address>
59
+
60
+ Specify an email address to which crash notification messages are sent.
61
+ If no email address is specified, email will not be sent.
62
+
63
+
64
+ Configuring :command:`crashmail` Into the Supervisor Config
65
+ -----------------------------------------------------------
66
+
67
+ An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
68
+ in order for :command:`crashmail` to do its work. See the "Events" chapter in
69
+ the Supervisor manual for more information about event listeners.
70
+
71
+ The following example assumes that :command:`crashmail` is on your system
72
+ :envvar:`PATH`.
73
+
74
+ .. code-block:: ini
75
+
76
+ [eventlistener:crashmail]
77
+ command=crashmail -p program1 -p group1:program2 -m dev@example.com
78
+ events=PROCESS_STATE_EXITED
@@ -0,0 +1,82 @@
1
+ :command:`crashmailbatch` Documentation
2
+ =======================================
3
+
4
+ :command:`crashmailbatch` is a supervisor "event listener", intended to be
5
+ subscribed to ``PROCESS_STATE`` and ``TICK_60`` events. It monitors
6
+ all processes running under a given supervisord instance.
7
+
8
+ Similar to :command:`crashmail`, :command:`crashmailbatch` sends email
9
+ alerts when processes die unexpectedly. The difference is that all alerts
10
+ generated within the configured time interval are batched together to avoid
11
+ sending too many emails.
12
+
13
+ :command:`crashmailbatch` is a "console script" installed when you install
14
+ :mod:`superguard`. Although :command:`crashmailbatch` is an executable
15
+ program, it isn't useful as a general-purpose script: it must be run as a
16
+ :command:`supervisor` event listener to do anything useful.
17
+
18
+ Command-Line Syntax
19
+ -------------------
20
+
21
+ .. code-block:: sh
22
+
23
+ $ crashmailbatch --toEmail=<email address> --fromEmail=<email address> \
24
+ [--interval=<batch interval in minutes>] [--subject=<email subject>] \
25
+ [--tickEvent=<event name>] [--smtpHost=<SMTP server>] \
26
+ [--userName=<SMTP username>] [--password=<STMP password>] \
27
+ [--tls]
28
+
29
+ .. program:: crashmailbatch
30
+
31
+ .. cmdoption:: -t <destination email>, --toEmail=<destination email>
32
+
33
+ Specify comma separated email addresses to which crash notification messages are sent.
34
+
35
+ .. cmdoption:: -f <source email>, --fromEmail=<source email>
36
+
37
+ Specify an email address from which crash notification messages are sent.
38
+
39
+ .. cmdoption:: -i <interval>, --interval=<interval>
40
+
41
+ Specify the time interval in minutes to use for batching notifcations.
42
+ Defaults to 1.0 minute.
43
+
44
+ .. cmdoption:: -s <email subject>, --subject=<email subject>
45
+
46
+ Override the email subject line. Defaults to "Crash alert from supervisord"
47
+
48
+ .. cmdoption:: -e <event name>, --tickEvent=<event name>
49
+
50
+ Override the TICK event name. Defaults to "TICK_60"
51
+
52
+ .. cmdoption:: -H <STMP server> --smtpHost <SMTP server>
53
+
54
+ Specify STMP server for sending email
55
+
56
+ .. cmdoption:: -u <STMP username> --userName <SMTP username>
57
+
58
+ Specify STMP username
59
+
60
+ .. cmdoption:: -p <STMP password> --password <SMTP password>
61
+
62
+ Specify STMP password
63
+
64
+ .. cmdoption:: --tls
65
+
66
+ Use Transport Layer Security (TLS)
67
+
68
+ Configuring :command:`crashmailbatch` Into the Supervisor Config
69
+ ----------------------------------------------------------------
70
+
71
+ An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
72
+ in order for :command:`crashmailbatch` to do its work. See the "Events" chapter in
73
+ the Supervisor manual for more information about event listeners.
74
+
75
+ The following example assumes that :command:`crashmailbatch` is on your system
76
+ :envvar:`PATH`.
77
+
78
+ .. code-block:: ini
79
+
80
+ [eventlistener:crashmailbatch]
81
+ command=crashmailbatch --toEmail="alertme@fubar.com" --fromEmail="supervisord@fubar.com"
82
+ events=PROCESS_STATE,TICK_60
@@ -0,0 +1,62 @@
1
+ :command:`crashsms` Documentation
2
+ ==================================
3
+
4
+ :command:`crashsms` is a supervisor "event listener", intended to be
5
+ subscribed to ``PROCESS_STATE`` events and ``TICK`` events such as ``TICK_60``. It monitors
6
+ all processes running under a given supervisord instance.
7
+
8
+ Similar to :command:`crashmailbatch`, :command:`crashsms` sends SMS alerts
9
+ through an email gateway. Messages are formatted to fit in SMS
10
+
11
+ :command:`crashsms` is a "console script" installed when you install
12
+ :mod:`superguard`. Although :command:`crashsms` is an executable
13
+ program, it isn't useful as a general-purpose script: it must be run as a
14
+ :command:`supervisor` event listener to do anything useful.
15
+
16
+ Command-Line Syntax
17
+ -------------------
18
+
19
+ .. code-block:: sh
20
+
21
+ $ crashsms --toEmail=<email address> --fromEmail=<email address> \
22
+ [--interval=<batch interval in minutes>] [--subject=<email subject>] \
23
+ [--tickEvent=<event name>]
24
+
25
+ .. program:: crashsms
26
+
27
+ .. cmdoption:: -t <destination email>, --toEmail=<destination email>
28
+
29
+ Specify comma separated email addresses to which crash notification messages are sent.
30
+
31
+ .. cmdoption:: -f <source email>, --fromEmail=<source email>
32
+
33
+ Specify an email address from which crash notification messages are sent.
34
+
35
+ .. cmdoption:: -i <interval>, --interval=<interval>
36
+
37
+ Specify the time interval in minutes to use for batching notifcations.
38
+ Defaults to 1.0 minute.
39
+
40
+ .. cmdoption:: -s <email subject>, --subject=<email subject>
41
+
42
+ Set the email subject line. Default is None
43
+
44
+ .. cmdoption:: -e <event name>, --tickEvent=<event name>
45
+
46
+ Override the TICK event name. Defaults to "TICK_60"
47
+
48
+ Configuring :command:`crashsms` Into the Supervisor Config
49
+ -----------------------------------------------------------
50
+
51
+ An ``[eventlistener:x]`` section must be placed in :file:`supervisord.conf`
52
+ in order for :command:`crashsms` to do its work. See the "Events" chapter in
53
+ the Supervisor manual for more information about event listeners.
54
+
55
+ The following example assumes that :command:`crashsms` is on your system
56
+ :envvar:`PATH`.
57
+
58
+ .. code-block:: ini
59
+
60
+ [eventlistener:crashsms]
61
+ command=crashsms --toEmail="<mobile number>@<sms email gateway>" --fromEmail="supervisord@fubar.com"
62
+ events=PROCESS_STATE,TICK_60