Superlance
raw JSON → 2.0.0 verified Mon Apr 27 auth: no python
Superlance is a collection of plugin/monitor scripts for the Supervisor process control system. Version 2.0.0 introduces a major restructuring: it now requires Python 3.6+ and Supervisor 4+, and all scripts are installed as console scripts (e.g., `memmon`, `httpok`). The library is actively maintained with a mature API.
pip install superlance Common errors
error ImportError: No module named 'superlance' ↓
cause Superlance is not installed, or the environment is not activated.
fix
Run
pip install superlance in the correct Python environment. error FileNotFoundError: [Errno 2] No such file or directory: 'memmon' ↓
cause Superlance scripts are not installed as executable commands; often due to missing PATH or using old import pattern.
fix
Ensure superlance is installed in the same Python environment as supervisord. Use
which memmon to locate, or run python -m superlance.memmon if using superlance <2.0.0. error superlance.eventlistener: Error: listener configuration not found ↓
cause The supervisord.conf does not contain the required [eventlistener:...] section for the plugin.
fix
Add an eventlistener section in supervisord.conf, e.g.:
[eventlistener:memmon]
command=memmon
events=PROCESS_STATE
Warnings
breaking Superlance 2.0.0 drops support for Python versions before 3.6 and Supervisor versions before 4. If you are on an older environment, pin to superlance==1.0.2. ↓
fix Upgrade to Python 3.6+ and Supervisor 4+. Alternatively, use `pip install superlance==1.0.2`.
breaking In Superlance 2.0.0, the old pattern of running scripts via `python -m superlance.memmon` no longer works. Use the console scripts directly (e.g., `memmon`). ↓
fix Run `memmon` instead of `python -m superlance.memmon`.
gotcha Superlance scripts read Supervisor event listener configuration from the [eventlistener:...] section in supervisord.conf. Misconfiguration of the listener (e.g., missing environment variables) causes silent failures. ↓
fix Ensure you have properly configured the [eventlistener:xxx] section in supervisord.conf and that the script path points to the correct console script.
Imports
- Memmon
from superlance.memmon import Memmon - HttpOk
from superlance.httpok import HttpOk - FatalMailBatch
from superlance.fatalmailbatch import FatalMailBatch
Quickstart
python -c "from superlance.memmon import Memmon; print('Memmon imported successfully')"