# dockpeek Stack
description: Monitoring service for Docker containers

---
# Overview
The dockpeek stack provides a monitoring service for Docker containers in NetGrimoire. It includes the dockpeek application, which is used to monitor container performance and health.

## Architecture

| Service | Image | Port | Role |
|---------|-------|------|------|
- **Host:** docker4
- **Network:** netgrimoire
- **Exposed via:** dockpeek.netgrimoire.com, Internal only
- **Homepage group:** Monitoring

---
# Build & Configuration

### Prerequisites
This stack requires a Docker Swarm cluster with at least one manager node and two worker nodes (docker4).

### Volume Setup
```bash
mkdir -p /DockerVol/dockpeek
chown docker:docker /DockerVol/dockpeek
```

### Environment Variables
```bash
SECRET_KEY=$(openssl rand -hex 32)
USERNAME=traveler
PASSWORD=F@lcon13
```

### Deploy
```bash
cd services/swarm/stack/dockpeek
set -a && source .env && set +a
docker stack config --compose-file dockpeek-stack.yml > resolved.yml
docker stack deploy --compose-file resolved.yml dockpeek
rm resolved.yml
docker stack services dockpeek
```

### First Run
After deploying the stack, ensure that the Caddy reverse proxy is configured to point to the dockpeek service. You can do this by running the following command:
```bash
caddy dockpeek.netgrimoire.com -config file://caddy.conf
```
This will enable Caddy to proxy requests from your dashboard to the dockpeek application.

---
# User Guide

### Accessing dockpeek
| Service | URL | Purpose |
|---------|-----|---------|
- **dockpeek** | http://dockpeek.netgrimoire.com | Monitoring service |

### Primary Use Cases
To access the dockpeek monitoring service, simply navigate to the specified URL in your web browser.

### NetGrimoire Integrations
The dockpeek stack integrates with other services in NetGrimoire through environment variables and labels. For example, the `KUMA_*` labels are used to configure Kuma monitoring for the dockpeek service.

---
# Operations

### Monitoring
To view the performance metrics for your containers using the dockpeek service, navigate to http://dockpeek.netgrimoire.com in your web browser.
```bash
docker stack services dockpeek
docker service logs dockpeek -f
```

### Backups
Critical backups should be performed on a regular basis to ensure data consistency. You can perform manual backups by copying the `/DockerVol/dockpeek` directory to an external location.

### Restore
To restore the dockpeek stack, simply re-run the deployment script:
```bash
cd services/swarm/stack/dockpeek
./deploy.sh
```
This will rebuild and deploy the stack with the most recent configuration.

---
# Common Failures
 Failure Mode | Symptom | Cause | Fix

| 1 | Service not responding | No connections established | Check Caddy configuration and ensure proper DNS resolution for dockpeek.netgrimoire.com. |
| 2 | Error in container logs | Insufficient permissions to read log files | Ensure that the `docker` user has read access to the Docker log directory. |
| 3 | Service crashes unexpectedly | Inconsistent application configuration | Run `docker stack services dockpeek` and inspect the service configuration for any inconsistencies. |
| 4 | Monitoring data not updating | Incorrect Kuma configuration | Verify that the `KUMA_*` labels are properly configured in the dockpeek environment variables file. |
| 5 | Service not deploying | Docker Swarm configuration issues | Run `docker stack config --compose-file dockpeek-stack.yml > resolved.yml` to ensure that the stack configuration is correct.

---
# Changelog

| Date | Commit | Summary |
|------|--------|---------|
| 2026-04-29 | 39f3f45c | Added support for Docker Swarm manager node |
| 2026-04-29 | 2256faaa | Fixed issues with Caddy reverse proxy configuration |
| 2026-01-26 | 7e49e367 | Improved Docker Swarm node health checks |
| 2026-01-26 | a0b6663e | Enhanced Kuma monitoring for dockpeek service |
| 2026-01-10 | 1a374911 | Initial documentation and configuration for dockpeek stack |

---
# Notes
Generated by Gremlin on 2026-04-30T03:20:12.980Z
Source: swarm/dockpeek.yaml
Review User Guide and Changelog sections