Portainer-Info-Extract is a Python-based tool designed for gathering and analyzing Docker Swarm information through the Portainer API. It provides a streamlined way to extract key details about services, secrets, nodes, and container statistics.
- Automated retrieval of services, secrets, nodes, and container data in Docker Swarm.
- Extraction and processing of environment variables, configurations, and mounts.
- Excel report generation for detailed analysis.
- Comprehensive error logging for API requests.
Before running the script, set the following environment variables:
export PORTAINER_HOST=your_portainer_host
export PORTAINER_USER=your_username
export PORTAINER_PASSWORD=your_password
Replace your_portainer_host
, your_username
, and your_password
with your actual Portainer credentials.
- Clone the repository.
- Create and activate a virtual environment:
make venv
- Install dependencies:
make pip-compile
- Execute the script with:
make run
- Auto-formatting:
make autopep8
- Code style check:
make pycodestyle
- Lint check:
make check
- To clean the virtual environment and temporary files:
make clean
- For a list of available commands:
make help