ArguSwarm is a distributed Docker container monitoring system designed for Docker Swarm environments. It consists of an overseer service that runs on manager nodes and scout agents that run on worker nodes to collect and aggregate container information across the swarm.
- Distributed container monitoring across Docker Swarm cluster
- REST API for querying container state and health
- Container health monitoring with customizable filters
- Real-time container, image, network, and volume information
- Secure communication between components using shared secrets
- Horizontal scalability with scout agents running on each node
- Parallel query execution with configurable concurrency
-
Overseer: Central service that runs on manager nodes
- Manages scout discovery and health monitoring
- Aggregates container information from all scouts
- Provides REST API endpoints for clients
- Handles authentication and security
-
Scout: Agent service that runs on worker nodes
- Collects local container information
- Monitors container health status
- Exposes REST API for overseer queries
- Reports node-specific metrics
-
Clone the repository:
git clone https://github.com/hibare/ArguSwarm.git cd ArguSwarm
-
Copy and configure environment variables:
cp .env.example .env
-
Configure the following required environment variables:
ARGUSWARM_SERVER_SHARED_SECRET=<your-secret> # Shared secret for overseer-scout communication ARGUSWARM_OVERSEER_AUTH_TOKENS=<token1,token2> # Auth tokens for API access
-
Deploy to Docker Swarm:
docker stack deploy -c docker-compose.yml arguswarm
ArguSwarm can be configured using environment variables:
Variable | Description | Default |
---|---|---|
ARGUSWARM_OVERSEER_PORT | Overseer service port | 8080 |
ARGUSWARM_SCOUT_PORT | Scout service port | 8081 |
ARGUSWARM_MAX_CONCURRENT_SCOUTS_QUERY | Max parallel scout queries | 10 |
ARGUSWARM_LOG_LEVEL | Logging level | info |
ARGUSWARM_LOG_MODE | Logging mode (text/json) | text |
Overseer API Endpoints
GET /api/v1/scouts
- List all connected scoutsGET /api/v1/containers
- List all containers across the swarmGET /api/v1/images
- List all images across the swarmGET /api/v1/networks
- List all networks across the swarmGET /api/v1/volumes
- List all volumes across the swarmGET /api/v1/container/{name}/healthy
- Check container health status
All API endpoints require authentication using the configured auth tokens.
Scout API Endpoints
GET /api/v1/containers
- List containers on the nodeGET /api/v1/images
- List images on the nodeGET /api/v1/networks
- List networks on the nodeGET /api/v1/volumes
- List volumes on the node
- Go 1.24 or later
- Docker
- Docker Compose
- Make
-
Initialize the project:
make init
-
Start development servers:
make dev
-
Run tests:
make test
cmd
- Main application entry pointsinternal
- Internal packagesopenapi
- API specifications.air
- Development server configurationsdocker-compose.dev.yml
- Development environment setup
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request