-
Notifications
You must be signed in to change notification settings - Fork 76
Bulk Operations
Perform actions on multiple containers simultaneously with DockMon v2's powerful bulk operation system.
Bulk operations allow you to manage multiple containers at once, saving time and reducing repetitive tasks. DockMon v2's bulk operation system features real-time progress tracking, intelligent rate limiting, and detailed error reporting.
Key features:
- Multi-container selection - Select containers via checkboxes with filtering
- Parallel execution - Actions run concurrently with rate limiting per host
- Real-time progress - Live WebSocket updates showing operation status
- Partial success handling - Some containers can succeed while others fail
- Detailed error reporting - See exactly which containers failed and why
- Operation history - Track completed bulk operations
Supported operations:
- Start containers
- Stop containers
- Restart containers
- Add tags
- Remove tags
- Enable/disable auto-restart
- Enable/disable auto-update
- Set desired state
- Navigate to the Container Dashboard
- Look for the Bulk Select toggle in the toolbar (checkbox icon)
- Click to enable bulk select mode
- Checkboxes appear next to each container
Tip: Use filters (tags, host, search) to narrow down containers before selecting.
Method 1: Manual Selection
- Click checkboxes next to containers you want to operate on
- Selected count appears in the toolbar (e.g., "5 selected")
- Click again to deselect
Method 2: Select All (Filtered)
- Click Select All button in toolbar
- Selects all containers currently visible (respects filters)
- Maximum: 100 containers at once (safety limit)
Method 3: Tag-Based Selection
- Filter by tag(s) first
- Click Select All
- All containers with those tags are selected
Example: Select all production containers
1. Filter by tag: "production"
2. Click "Select All"
3. → 45 containers selected
-
Click the Bulk Actions dropdown button
-
Select the action you want to perform:
- Start - Start all selected containers
- Stop - Stop all selected containers
- Restart - Restart all selected containers
- Add Tags - Add tag(s) to all selected containers
- Remove Tags - Remove tag(s) from all selected containers
- Set Auto-Restart - Enable/disable auto-restart
- Set Auto-Update - Enable/disable auto-update
- Set Desired State - Set desired state (should_run, on_demand)
-
If the action requires parameters (tags, settings), a dialog appears
-
Enter parameters and click Confirm
Real-time status panel:
- Appears at the bottom of the screen when operation starts
- Shows overall progress (e.g., "15/45 completed")
- Lists containers with their current status:
- Queued (gray) - Waiting to process
- Running (blue) - Currently executing
- Success (green) - Completed successfully
- Error (red) - Failed with error message
- Skipped (yellow) - Skipped (already in desired state)
Progress updates:
- Container status updates in real-time via WebSocket
- No need to refresh the page
- Operation continues in background if you navigate away
When operation completes:
- Final status shows: Completed, Partial, or Failed
- Completed - All containers succeeded
- Partial - Some succeeded, some failed
- Failed - All containers failed
Summary statistics:
Total: 45 containers
Success: 42 containers
Errors: 2 containers
Skipped: 1 container
Detailed results:
- Expand each container to see status and error message
- Click container name to jump to container details
- Export results (optional, if implemented)
Action: Start all selected stopped containers
Behavior:
- Containers already running are skipped
- Containers start in parallel (rate limited)
- Uses Docker's native start command
Use cases:
- Start all containers after maintenance
- Resume services after backup
- Start all containers in a specific environment
Example:
1. Filter by tag: "staging"
2. Filter by state: "exited"
3. Select all → 12 containers
4. Bulk Actions → Start
5. → 12 containers start in parallel
Action: Stop all selected running containers
Behavior:
- Sends SIGTERM, waits 10 seconds, then SIGKILL
- Containers already stopped are skipped
- Graceful shutdown with timeout
Use cases:
- Stop all containers before host maintenance
- Stop all containers in an environment for backup
- Emergency stop for troubleshooting
Example:
1. Filter by host: "Dev-Server"
2. Select all running containers → 25 containers
3. Bulk Actions → Stop
4. → All containers stop gracefully
Warning: Stopping critical containers may cause downtime. Double-check your selection before confirming.
Action: Restart all selected containers
Behavior:
- Equivalent to stop + start
- 10 second graceful shutdown timeout
- Containers restart in parallel
- Containers already stopped are started
Use cases:
- Apply configuration changes (environment variables, volumes)
- Clear container state issues
- Refresh services after image updates
Example:
1. Filter by tag: "web-tier"
2. Select all → 8 containers
3. Bulk Actions → Restart
4. → All web-tier containers restart
Tip: For updates, consider using Automatic Updates instead of manual restart.
Action: Add one or more tags to selected containers
Behavior:
- Tags are added to existing tags (not replaced)
- Duplicate tags are ignored
- Custom tags are stored in DockMon database
Use cases:
- Tag newly deployed containers
- Add organizational tags in bulk
- Mark containers for maintenance
Dialog options:
-
Tags to add: Comma-separated list (e.g.,
production,critical) - Tag validation: Alphanumeric, hyphens, underscores only
Example:
1. Filter by compose project: "compose:myapp"
2. Select all → 5 containers
3. Bulk Actions → Add Tags
4. Enter: "production,critical"
5. → All containers tagged with "production" and "critical"
See Container Tagging for tag management details.
Action: Remove one or more tags from selected containers
Behavior:
- Only removes custom tags (not automatic tags)
- Tags not present are ignored
- Container keeps other tags
Use cases:
- Remove obsolete tags
- Change container categorization
- Remove temporary tags
Dialog options:
- Tags to remove: Comma-separated list
Example:
1. Filter by tag: "needs-update"
2. Select all → 10 containers
3. Bulk Actions → Remove Tags
4. Enter: "needs-update"
5. → Tag removed from all containers
Action: Enable or disable auto-restart for selected containers
Behavior:
- Enables/disables DockMon's auto-restart feature
- Independent of Docker's restart policy
- Settings stored in DockMon database
Dialog options:
- Enable auto-restart: Yes/No
- Max retries: Number of restart attempts (default: 3)
- Retry delay: Seconds between retries (default: 30)
Use cases:
- Enable auto-restart for all production containers
- Disable auto-restart during maintenance
- Configure consistent restart policies
Example:
1. Filter by tag: "production"
2. Select all → 30 containers
3. Bulk Actions → Set Auto-Restart
4. Enable: Yes, Max retries: 5, Delay: 60s
5. → All production containers have auto-restart enabled
See Auto-Restart for configuration details.
Action: Enable or disable automatic updates for selected containers
Behavior:
- Enables/disables DockMon's auto-update feature
- Configures floating tag mode (exact, minor, major, latest)
- Updates run on schedule (daily by default)
Dialog options:
- Enable auto-update: Yes/No
-
Floating tag mode:
-
exact- Only update to exact tag (no floating) -
minor- Update to latest minor version (e.g., 1.2.x → 1.2.5) -
major- Update to latest major version (e.g., 1.x → 1.9) -
latest- Always update to :latest
-
Use cases:
- Enable auto-update for development containers
- Configure safe update strategy for production
- Disable auto-update for stable containers
Example:
1. Filter by tag: "staging"
2. Select all → 20 containers
3. Bulk Actions → Set Auto-Update
4. Enable: Yes, Mode: minor
5. → All staging containers auto-update to latest minor version
See Automatic Updates for details.
Action: Set desired container state for monitoring
Behavior:
- Sets expected state for DockMon monitoring
- Used for auto-restart decisions
- Options: should_run, on_demand, unspecified
Dialog options:
-
Desired State:
-
should_run- Container should always be running (auto-restart if stopped) -
on_demand- Container runs only when needed (don't auto-restart) -
unspecified- No desired state (default)
-
Use cases:
- Mark production containers as should_run
- Mark maintenance containers as on_demand
- Configure monitoring expectations
Example:
1. Filter by tag: "critical"
2. Select all → 15 containers
3. Bulk Actions → Set Desired State
4. State: should_run
5. → All critical containers marked as should_run
DockMon enforces 5 concurrent operations per host to prevent overloading Docker daemons.
Why rate limiting?
- Prevents Docker API overload
- Avoids network saturation
- Maintains system stability
- Reduces error rates
How it works:
Selected: 50 containers across 5 hosts
→ Each host processes max 5 containers at once
→ Total: Up to 25 concurrent operations
→ Remaining containers queue until slots available
Example timeline:
0s: 25 containers start processing (5 per host)
2s: 10 containers complete → 10 more start
4s: 15 more complete → 15 more start
6s: All 50 containers complete
Per-container timeout: 60 seconds
Behavior:
- If operation takes >60s, it's marked as error
- Prevents hung operations from blocking queue
- Rare in practice (most operations complete in <5s)
Maximum containers per operation: 100
Reason: UI/UX performance and WebSocket message size
Workaround for >100 containers:
- Run multiple smaller operations
- Use tag filtering to create logical groups
- Contact support for bulk operation API (no UI limits)
Scenario: 45 containers selected, 42 succeed, 3 fail
Behavior:
- Operation completes with status "Partial"
- Successful containers show green checkmarks
- Failed containers show red X with error messages
- You can retry failed containers individually
Example errors:
Container "postgres": Error - Container not found (deleted during operation)
Container "redis": Error - Connection timeout to host
Container "nginx": Skipped - Already running
Cause: Container was deleted between selection and execution
Solution: Refresh container list and retry
Cause: Host is offline or network issues
Solution: Check host connectivity, retry when online
Cause: Docker socket permissions issue
Solution: Check DockMon's Docker socket access
Status: Skipped (not an error)
Cause: Container is already running (for start), stopped (for stop), etc.
Solution: No action needed - this is expected behavior
Option 1: Retry Individual Containers
- Review failed containers in results panel
- Click container name to open details
- Manually execute action (start, stop, etc.)
Option 2: Retry Failed Group
- Note which containers failed
- Create new bulk operation with only those containers
- Execute
Option 3: Investigate and Fix
- Check error messages
- Fix underlying issues (host connectivity, permissions, etc.)
- Retry
1. Double-check selection
- Review selected containers carefully
- Use filters to narrow scope
- Check selected count matches expectations
2. Test on small subset first
- Select 2-3 containers
- Run operation
- Verify behavior
- Then select all
3. Consider impact
- Will this cause downtime?
- Do you have a rollback plan?
- Is there a maintenance window?
4. Use appropriate filters
- Tag filtering prevents mistakes
- Host filtering isolates impact
- State filtering ensures correct targets
1. Monitor progress
- Watch for unexpected errors
- Check error messages immediately
- Cancel operation if something looks wrong (refresh page)
2. Don't navigate away
- Stay on page to monitor progress
- Operations continue in background but you lose visibility
3. Note failed containers
- Save error messages for troubleshooting
- Check why failures occurred
1. Verify results
- Check container states match expectations
- Review error messages
- Test critical services
2. Clean up
- Remove temporary tags (if used)
- Update documentation
- Note any issues for future operations
3. Document changes
- Record what was changed
- Note any issues encountered
- Update runbooks if needed
Scenario: Monthly maintenance requires restarting all production containers
Steps:
1. Announce maintenance window
2. Filter by tag: "production"
3. Select all → 50 containers
4. Bulk Actions → Restart
5. Monitor progress (expect 2-3 minutes)
6. Verify services are healthy
7. Announce completion
Pro tip: Create a checklist for monthly maintenance to ensure consistency.
Scenario: Database corruption detected, need to stop all apps accessing DB immediately
Steps:
1. Filter by tag: "uses-postgres"
2. Select all → 15 containers
3. Bulk Actions → Stop
4. → All apps stop within 10 seconds
5. Fix database corruption
6. Restart apps with Bulk Actions → Start
Time saved: 5 minutes vs. stopping 15 containers manually
Scenario: Deployed 20 new microservices, need to tag and configure them
Steps:
1. Filter by compose project: "compose:ecommerce-v2"
2. Select all → 20 containers
3. Bulk Actions → Add Tags
- Enter: "production,v2,needs-monitoring"
4. Wait for completion
5. Keep same selection
6. Bulk Actions → Set Auto-Restart
- Enable: Yes, Max retries: 5, Delay: 60s
7. Keep same selection
8. Bulk Actions → Set Auto-Update
- Enable: Yes, Mode: minor
9. Done - all containers tagged and configured
Time saved: 15 minutes vs. configuring 20 containers individually
Scenario: Promote staging containers to production
Steps:
1. Filter by tag: "staging-ready"
2. Select all → 12 containers
3. Bulk Actions → Add Tags
- Enter: "production"
4. Keep same selection
5. Bulk Actions → Remove Tags
- Enter: "staging-ready"
6. Keep same selection
7. Bulk Actions → Set Auto-Restart
- Enable: Yes
8. Done - containers promoted to production
Scenario: Remove "needs-update" tag from containers that have been updated
Steps:
1. Filter by tag: "needs-update"
2. Review list to verify all are updated
3. Select all → 25 containers
4. Bulk Actions → Remove Tags
- Enter: "needs-update"
5. → Tag removed from all containers
6. Tag filter clears (no containers have that tag anymore)
Symptom: Click bulk action but nothing happens
Check:
- Are containers selected? (Check selected count)
- Is operation already running? (Check for status panel)
- Are you connected to WebSocket? (Check network tab)
Solution: Refresh page and retry
Symptom: Operation shows running but no progress for >5 minutes
Possible causes:
- WebSocket connection lost
- Backend crashed
- Docker daemon unresponsive on remote host
Solution:
- Refresh page to check actual status
- Check DockMon backend logs:
docker logs dockmon - Check host connectivity
- Contact support if issue persists
Symptom: Same containers fail in every bulk operation
Check:
- Error message details
- Host connectivity
- Container state (maybe deleted?)
- Permissions
Solution: Fix underlying issue before retrying
Symptom: Operation started but progress panel is blank
Cause: WebSocket connection issue
Solution:
- Check browser console for WebSocket errors
- Refresh page
- Check if WebSocket is blocked by firewall/proxy
Bulk select mode:
-
b- Toggle bulk select mode -
a- Select all (when in bulk mode) -
Escape- Clear selection and exit bulk mode
During operation:
-
Escape- Close status panel (operation continues in background)
- Container Tagging - Organize containers for bulk selection
- Container Operations - Individual container actions
- Automatic Updates - Auto-update configuration
- Auto-Restart - Auto-restart configuration
Getting Started
User Guide
- Dashboard
- Managing Hosts
- Container Operations
- Container Tagging
- Bulk Operations
- Stacks
- Auto-Restart
- Event Viewer
- Container Logs
Configuration
- Alert Rules
- Notifications
- Blackout Windows
- Automatic Updates
- Private Registry Credentials
- Health Checks
- Settings
Remote Monitoring
Access Control
Advanced
Development
Help