Lightweight OS-agnostic service monitoring API
Platform Supported
Deployments
Recommendations
- Install
python
3.10 or 3.11 - Use a dedicated virtual environment
Install PyNinja
python -m pip install pyninja
Initiate - IDE
import pyninja
if __name__ == '__main__':
pyninja.start()
Initiate - CLI
pyninja start
Use
pyninja --help
for usage instructions.
Sourcing environment variables from an env file
By default,
PyNinja
will look for a.env
file in the current working directory.
- APIKEY - API Key for authentication.
- NINJA_HOST - Hostname for the API server.
- NINJA_PORT - Port number for the API server.
- REMOTE_EXECUTION - Boolean flag to enable remote execution.
- API_SECRET - Secret access key for running commands on server remotely.
- DISK_REPORT - Boolean flag to enable disk report feature using PyUdisk.
- MONITOR_USERNAME - Username to authenticate the monitoring page.
- MONITOR_PASSWORD - Password to authenticate the monitoring page.
- MONITOR_SESSION - Session timeout for the monitoring page.
- NO_AUTH - Boolean flag to host monitoring page without authentication.
- MAX_CONNECTIONS - Maximum number of monitoring sessions allowed in parallel.
- PROCESSES - List of process names to include in the monitor page.
- SERVICES - List of service names to include in the monitor page.
- GPU_LIB - GPU library filepath to use for monitoring.
- DISK_LIB - Disk library filepath to use for monitoring.
- SERVICE_LIB - Memory library filepath to use for monitoring.
- PROCESSOR_LIB - Processor library filepath to use for monitoring.
- DATABASE - FilePath to store the auth database that handles the authentication errors.
- RATE_LIMIT - List of dictionaries with
max_requests
andseconds
to apply as rate limit. - LOG_CONFIG - Logging configuration file path.
Refer samples directory for examples.
Docstring format: Google
Styling conventions: PEP 8
and isort
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
pre-commit
will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL
markdown files (including Wiki pages)
Requirement
python -m pip install sphinx==5.1.1 pre-commit recommonmark
Usage
pre-commit run --all-files
https://pypi.org/project/PyNinja/
https://thevickypedia.github.io/PyNinja/
© Vignesh Rao
Licensed under the MIT License