{"id":22425,"library":"superlance","title":"Superlance","description":"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.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/Supervisor/superlance","tags":["supervisor","monitoring","process management","event listener"],"install":[{"cmd":"pip install superlance","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Superlance plugins run as Supervisor event listeners; supervisor must be installed and configured.","package":"supervisor","optional":false}],"imports":[{"note":"Memmon is a class that monitors memory usage of supervised processes.","symbol":"Memmon","correct":"from superlance.memmon import Memmon"},{"note":"HttpOk checks HTTP endpoints and restarts processes if they are not responding.","symbol":"HttpOk","correct":"from superlance.httpok import HttpOk"},{"note":"Sends email notifications for fatal process events.","symbol":"FatalMailBatch","correct":"from superlance.fatalmailbatch import FatalMailBatch"}],"quickstart":{"code":"python -c \"from superlance.memmon import Memmon; print('Memmon imported successfully')\"","lang":"python","description":"Verify that Superlance is installed and importable. Superlance scripts are typically run as command-line programs, not imported as libraries."},"warnings":[{"fix":"Upgrade to Python 3.6+ and Supervisor 4+. Alternatively, use `pip install superlance==1.0.2`.","message":"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.","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Run `memmon` instead of `python -m superlance.memmon`.","message":"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`).","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Ensure you have properly configured the [eventlistener:xxx] section in supervisord.conf and that the script path points to the correct console script.","message":"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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install superlance` in the correct Python environment.","cause":"Superlance is not installed, or the environment is not activated.","error":"ImportError: No module named 'superlance'"},{"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.","cause":"Superlance scripts are not installed as executable commands; often due to missing PATH or using old import pattern.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'memmon'"},{"fix":"Add an eventlistener section in supervisord.conf, e.g.:\n[eventlistener:memmon]\ncommand=memmon\nevents=PROCESS_STATE","cause":"The supervisord.conf does not contain the required [eventlistener:...] section for the plugin.","error":"superlance.eventlistener: Error: listener configuration not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}