{"id":15019598,"url":"https://github.com/tiagocoutinho/multivisor","last_synced_at":"2025-04-05T17:05:20.427Z","repository":{"id":29029071,"uuid":"117636621","full_name":"tiagocoutinho/multivisor","owner":"tiagocoutinho","description":"Centralized supervisor WebUI and CLI","archived":false,"fork":false,"pushed_at":"2023-03-03T18:21:43.000Z","size":1692,"stargazers_count":194,"open_issues_count":26,"forks_count":37,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-03-29T16:04:08.785Z","etag":null,"topics":["cli","flask","prompt-toolkit","python","supervisor","vue2","vuejs","vuetify","vuex","web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagocoutinho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-16T05:41:41.000Z","updated_at":"2025-03-11T08:40:37.000Z","dependencies_parsed_at":"2022-07-23T10:46:39.058Z","dependency_job_id":"08777e06-289f-4900-96b5-84d44876ac69","html_url":"https://github.com/tiagocoutinho/multivisor","commit_stats":{"total_commits":221,"total_committers":9,"mean_commits":"24.555555555555557","dds":0.1945701357466063,"last_synced_commit":"1e18a129acb3ec69f8edd36b33c149c69cb3deab"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fmultivisor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fmultivisor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fmultivisor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fmultivisor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagocoutinho","download_url":"https://codeload.github.com/tiagocoutinho/multivisor/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369952,"owners_count":20927928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","flask","prompt-toolkit","python","supervisor","vue2","vuejs","vuetify","vuex","web"],"created_at":"2024-09-24T19:53:44.956Z","updated_at":"2025-04-05T17:05:20.390Z","avatar_url":"https://github.com/tiagocoutinho.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Multivisor\n\n\u003cimg width=\"60%\" align=\"right\" alt=\"multivisor web on chrome desktop app\"\n title=\"multivisor web on chrome desktop app\"\n src=\"doc/multivisor_desktop.png\"\n/\u003e\n\n\n[![Multivisor][pypi-version]](https://pypi.python.org/pypi/multivisor)\n[![Python Versions][pypi-python-versions]](https://pypi.python.org/pypi/multivisor)\n[![Pypi status][pypi-status]](https://pypi.python.org/pypi/multivisor)\n![License][license]\n[![Build Status][build]](https://travis-ci.org/guy881/multivisor)\n\nA centralized supervisor UI (Web \u0026 CLI)\n\n* Processes status always up to date\n* Reactivity through asynchronous actions\n* Notifications when state changes\n* Mobile aware, SPA web page\n* Powerful filters\n* Interactive CLI\n* works on [supervisor](https://pypi.org/project/supervisor/)\n  and [supervisor-win](https://pypi.org/project/supervisor-win/)\n\nMultivisor is comprised of 3 components:\n\n1. **web server**: gathers information from all supervisors and provides a\n   dashboard like UI to the entire system\n1. **multivisor RPC**: an RPC extension to supervisor used to communicate\n   between each supervisord and multivisor web server\n1. **CLI**: an optional CLI which communicates with multivisor web server\n\n## Installation and configuration\n\nThe installation and configuration steps are exactly the same on Linux and\nWindows.\n\nThanks to the [ESRF](https://esrf.eu) sponsorship, multivisor is able to work\nwell with [supervisor-win](https://pypi.org/project/supervisor-win/).\n\n### RPC\n\nThe multivisor RPC must be installed in the same environment(s) as your\nsupervisord instances. It can be installed on python environments ranging from\n2.7 to 3.x.\n\nFrom within the same python environment as your supervisord process, type:\n\n```bash\npip install multivisor[rpc]\n```\n\nThere are two options to configure multivisor RPC: 1) as an extra\n[rpcinterface](http://supervisord.org/configuration.html#rpcinterface-x-section-settings)\nto supervisord or 2) an [eventlistener](http://supervisord.org/configuration.html#eventlistener-x-section-settings) process managed by supervisord.\n\nThe first option has the advantage of not requiring an extra process but it's\nimplementation relies on internal supervisord details. Therefore, the multivisor\nauthor recommends using the 2nd approach.\n\n#### Option 1: rpcinterface\n\nConfigure the multivisor rpc interface by adding the following lines\nto your *supervisord.conf*:\n\n```ini\n[rpcinterface:multivisor]\nsupervisor.rpcinterface_factory = multivisor.rpc:make_rpc_interface\nbind=*:9002\n```\n\nIf no *bind* is given, it defaults to `*:9002`.\n\nRepeat the above procedure for every supervisor you have running.\n\n#### Option 2: eventlistener\n\nConfigure the multivisor rpc interface by adding the following lines\nto your *supervisord.conf*:\n\n```ini\n[eventlistener:multivisor-rpc]\ncommand=multivisor-rpc --bind 0:9002\nevents=PROCESS_STATE,SUPERVISOR_STATE_CHANGE\n```\n\nIf no *bind* is given, it defaults to `*:9002`.\n\nYou are free to choose the event listener name. As a convention we propose\n`multivisor-rpc`.\n\nNB: Make sure that `multivisor-rpc` command is accessible or provide full PATH.\n\nRepeat the above procedure for every supervisor you have running.\n\n\n### Web server\n\nThe multivisor web server requires a python 3.x environment. It must be\ninstalled on a machine with a network access to the different supervisors.\nThis is achieved with:\n\n```bash\npip install multivisor[web]\n```\n\nThe web server is configured with a INI like configuration file\n(much like supervisor itself) that is passed as command line argument.\nIt is usually named *multivisor.conf* but can be any filename you which.\n\nThe file consists of a `global` section where you can give an optional name to\nyour multivisor instance (default is *multivisor*. This name will appear on the\ntop left corner of multivisor the web page).\n\nTo add a new supervisor to the list simply add a section `[supervisor:\u003cname\u003e]`.\nIt accepts an optional `url` in the format `[\u003chost\u003e][:\u003cport\u003e]`. The default\nis `\u003cname\u003e:9002`.\n\nHere is an example:\n\n```ini\n[global]\nname=ACME\n\n[supervisor:roadrunner]\n# since no url is given it will be roadrunner:9002\n\n[supervisor:coyote]\n# no host is given: defaults to coyote\nurl=:9011\n\n[supervisor:bugsbunny]\n# no port is given: defaults to 9002\nurl=bugsbunny.acme.org\n\n[supervisor:daffyduck]\nurl=daffyduck.acme.org:9007\n```\n\n\u003cimg width=\"40%\" align=\"right\" alt=\"multivisor web on mobile\"\n title=\"multivisor web on mobile\"\n src=\"doc/multivisor_mobile.png\"\n/\u003e\n\nOnce installed and configured, the web server can be started from the command\nline with:\n\n```bash\nmultivisor -c ./multivisor.conf\n```\n\nStart a browser pointing to [localhost:22000](http://localhost:22000).\nOn a mobile device it should look something like the figure on the right.\n\nOf course the multivisor web server itself can be configured in supervisor as a\nnormal program.\n\n#### Authentication\n\nTo protect multivisor from unwanted access, you can enable authentication.\n\nSpecify `username` and `password` parameters in `global` section of your configuration file e.g.:\n\n```ini\n[global]\nusername=test\npassword=test\n```\n\nYou can also specify `password` as SHA-1 hash in hex, with `{SHA}` prefix: e.g.\n`{SHA}a94a8fe5ccb19ba61c4c0873d391e987982fbbd3` (example hash is `test` in SHA-1).\n\nIn order to use authentication, you also need to set `MULTIVISOR_SECRET_KEY` environmental variable,\nas flask sessions module needs some secret value to create secure session.\nYou can generate some random hash easily using python:\n`python -c 'import os; import binascii; print(binascii.hexlify(os.urandom(32)))'`\n\n### CLI\n\nThe multivisor CLI is an optional component which can be installed with:\n\n```bash\npip install multivisor[cli]\n```\n\nThe CLI connects directly to the web server using an HTTP REST API.\nIt doesn't require any configuration.\n\nIt can be started with:\n\n```bash\nmultivisor-cli --url localhost:22000\n```\n\n![CLI in action](doc/cli.svg)\n\n# Running the docker demo\n\n```bash\n$ docker-compose build --parallel\n$ docker-compose up\n```\n\nThat's it!\n\nStart a browser pointing to [localhost:22000](http://localhost:22000).\n\n# Running the example from scratch\n\n```bash\n# Fetch the project:\ngit clone https://github.com/tiagocoutinho/multivisor\ncd multivisor\n\n\n# Install frontend dependencies\nnpm install\n# Build for production with minification\nnpm run build\n\n# feel free to use your favorite python virtual environment\n# here. Otherwise you will need administrative privileges\npip install .[all]\n\n# Launch a few supervisors\nmkdir examples/full_example/log\nsupervisord -c examples/full_example/supervisord_lid001.conf\nsupervisord -c examples/full_example/supervisord_lid002.conf\nsupervisord -c examples/full_example/supervisord_baslid001.conf\n\n# Finally, launch multivisor:\nmultivisor -c examples/full_example/multivisor.conf\n```\n\nThat's it!\n\nStart a browser pointing to [localhost:22000](http://localhost:22000). On a mobile\ndevice it should look something like this:\n\n![multivisor on mobile](doc/multivisor_mobile.png)\n\n# Technologies\n\n![multivisor diagram](doc/diagram.png)\n\nThe `multivisor` backend runs a [flask](http://flask.pocoo.org/) web server.\n\nThe `multivisor-cli` runs a\n[prompt-toolkit](http://python-prompt-toolkit.rtfd.io) based console.\n\nThe frontend is based on [vue](https://vuejs.org/) +\n[vuex](https://vuex.vuejs.org/) + [vuetify](https://vuetifyjs.com/).\n\n# Development\n\n## Build \u0026 Install\n\n```bash\n\n# install frontend\nnpm install\n\n# build for production with minification\nnpm run build\n\n# install backend\npip install -e .\n\n```\n\n## Run\n\n```bash\n# serve at localhost:22000\nmultivisor -c multivisor.conf\n```\n\nStart a browser pointing to [localhost:22000](http://localhost:22000)\n\n## Development mode\n\nYou can run the backend using the webpack dev server to facilitate your\ndevelopment cycle:\n\nFirst, start multivisor (which listens on 22000 by default):\n\n```bash\npython -m multivisor.server.web -c multivisor.conf\n```\n\nNow, in another console, run the webpack dev server (it will\ntransfer the requests between the browser and multivisor):\n\n``` bash\nnpm run dev\n```\n\nThat's it. If you modify `App.vue` for example, you should see the changes\ndirectly on your browser.\n\n\n[pypi-python-versions]: https://img.shields.io/pypi/pyversions/multivisor.svg\n[pypi-version]: https://img.shields.io/pypi/v/multivisor.svg\n[pypi-status]: https://img.shields.io/pypi/status/multivisor.svg\n[license]: https://img.shields.io/pypi/l/multivisor.svg\n[build]: https://travis-ci.org/guy881/multivisor.svg?branch=develop\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fmultivisor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagocoutinho%2Fmultivisor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fmultivisor/lists"}