An open source hardware monitoring agent
Capture is a hardware monitoring agent that collects hardware information from the host machine and exposes it through a RESTful API. The agent is designed to be lightweight and easy to use.
- Features
- Quick Start (Docker)
- Quick Start (Docker Compose)
- Configuration
- Installation Options
- Endpoints
- API Documentation
- Contributing
- Star History
- License
- CPU Monitoring
- Temperature
- Load
- Frequency
- Usage
- Memory Monitoring
- Disk Monitoring
- Usage
- Inode Usage
- Read/Write Bytes
- S.M.A.R.T. Monitoring (Self-Monitoring, Analysis and Reporting Technology)
- Network Monitoring
- Docker Container Monitoring
- GPU Monitoring (coming soon)
docker run -d \
-v /etc/os-release:/etc/os-release:ro \
-p 59232:59232 \
-e API_SECRET=your-secret-key \
ghcr.io/bluewave-labs/capture:latestservices:
# Capture service
capture:
image: ghcr.io/bluewave-labs/capture:latest
container_name: capture
restart: unless-stopped
ports:
- "59232:59232"
environment:
- API_SECRET=REPLACE_WITH_YOUR_SECRET # Required authentication key. Do not forget to replace this with your actual secret key.
- GIN_MODE=release
volumes:
- /etc/os-release:/etc/os-release:ro| Variable | Description | Default | Required |
|---|---|---|---|
API_SECRET |
Authentication key (Must match the secret you enter on Checkmate) | - | Yes |
PORT |
Server port number | 59232 | No |
GIN_MODE |
Gin(web framework) mode. Debug is for development | release | No |
Example configurations:
# Minimal
API_SECRET=your-secret-key ./capture
# Complete
API_SECRET=your-secret-key PORT=59232 GIN_MODE=release ./capturePull and run the official image:
docker run -d \
-v /etc/os-release:/etc/os-release:ro \
-p 59232:59232 \
-e API_SECRET=your-secret-key \
ghcr.io/bluewave-labs/capture:latestOr build locally:
docker buildx build -t capture .
docker run -d -v /etc/os-release:/etc/os-release:ro -p 59232:59232 -e API_SECRET=your-secret-key captureDocker options explained:
-v /etc/os-release:/etc/os-release:ro: Platform detection-p 59232:59232: Port mapping-e API_SECRET: Required authentication key-d: Detached mode
You can deploy Capture on a Kubernetes cluster using the provided Helm chart.
-
Go to the Helm chart directory:
cd deployment/helm/capture -
Customize
values.yamland set yourAPI_SECRET. -
Install the chart:
helm install capture .
For detailed instructions, refer to the Helm Installation Guide.
Choose one of these methods:
-
Pre-built Binaries: Download from GitHub Releases
-
Go Package:
go install github.com/bluewave-labs/capture/cmd/capture@latest
-
Build from Source:
git clone git@github.com:bluewave-labs/capture cd capture just build # or: go build -o dist/capture ./cmd/capture/
An install script is provided at deployment/linux/install.sh. It automatically detects your CPU architecture, downloads the latest release from GitHub, installs the binary to /usr/local/bin, and registers a systemd service.
Requirements: curl, tar, and a system running systemd. Must be run as root.
-
Download and run in one step:
curl -fsSL https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/linux/install.sh | sudo bashThe script will prompt you for
API_SECRETif it is not supplied as an argument. -
Supply options inline if preferred:
curl -fsSL https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/linux/install.sh \ | sudo bash -s -- --api-secret "your-secret-key" -
All available options:
curl -fsSL https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/linux/install.sh \ | sudo bash -s -- \ --api-secret "your-secret-key" \ --port 59232 \ --install-dir /usr/local/bin \ --service-name captureOr download the script first and run it locally:
curl -fsSL -o install.sh https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/linux/install.sh sudo bash install.sh --api-secret "your-secret-key" -
Full option reference:
Option Description Default --api-secretAuthentication key (required) (prompted) --portPort the agent listens on 59232--install-dirDirectory to install the binary /usr/local/bin--service-namesystemd service name capture -
After installation, manage the service with
systemctl:systemctl status capture systemctl stop capture systemctl start capture systemctl restart capture journalctl -u capture -f
If you prefer to configure the service manually, a template service file is provided at deployment/systemd/capture.service.
-
Edit the service file with your binary path, user, group, and secret key:
nano deployment/systemd/capture.service
-
Copy it to the systemd unit directory:
cp deployment/systemd/capture.service /etc/systemd/system/
-
Reload, enable, and start the service:
systemctl daemon-reload systemctl enable capture systemctl start capture -
Verify the service is running:
systemctl status capture
A PowerShell install script is provided at deployment/windows/install.ps1. It automatically detects your CPU architecture, downloads the latest release from GitHub, installs the binary, and registers a Windows service.
Requirements: PowerShell 5.1+ and an Administrator terminal.
-
Open PowerShell as Administrator and run in one step:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass Invoke-RestMethod https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/windows/install.ps1 | Invoke-Expression
The script will prompt you for
API_SECRETif it is not supplied as a parameter. -
Supply parameters inline if preferred:
& ([scriptblock]::Create( (Invoke-RestMethod https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/windows/install.ps1) )) -APISecret "your-secret-key"
-
All available parameters:
& ([scriptblock]::Create( (Invoke-RestMethod https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/windows/install.ps1) )) -APISecret "your-secret-key" -Port 59232 -InstallDir "C:\Program Files\Capture" -ServiceName "capture"
Or download the script first and run it locally:
Invoke-RestMethod https://raw.githubusercontent.com/bluewave-labs/capture/main/deployment/windows/install.ps1 -OutFile install.ps1 Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass .\install.ps1 -APISecret "your-secret-key"
-
Full parameter reference:
Parameter Description Default -APISecretAuthentication key (required) (prompted) -PortPort the agent listens on 59232-InstallDirDirectory to install the binary C:\Program Files\Capture-ServiceNameWindows service name capture -
After installation, manage the service with standard PowerShell cmdlets:
Get-Service capture Stop-Service capture Start-Service capture Restart-Service capture
You can use a reverse proxy in front of the Capture service to handle HTTPS requests and SSL termination.
├deployment/reverse-proxy-compose/
├── caddy/
│ └── Caddyfile
└── caddy.compose.yml-
Go to the
deployment/reverse-proxy-composedirectorycd deployment/reverse-proxy-compose -
Replace
replacewithyourdomain.comwith your actual domain in deployment/reverse-proxy-compose/caddy/Caddyfile -
Set
API_SECRETenvironment variable for the Capture service in deployment/reverse-proxy-compose/caddy.compose.yml. -
Ensure your domain’s DNS A/AAAA records point to this server’s IP.
-
Open inbound TCP ports 80 and 443 on your firewall/security group.
Start the Caddy reverse proxy
docker compose -f caddy.compose.yml up -d- Base URL:
http://<host>:<PORT>(default port59232) - Authentication: Every
/api/v1/**route requiresAuthorization: Bearer $API_SECRET./healthstays public so you can use it for liveness checks.
| Method | Path | Auth | Description | Notes |
|---|---|---|---|---|
GET |
/health |
❌ | Liveness probe that returns "OK". |
Useful for container orchestrators. |
GET |
/api/v1/metrics |
✅ | Returns the complete capture payload with CPU, memory, disk, host, SMART, network, and Docker data. | Aggregates every collector. |
GET |
/api/v1/metrics/cpu |
✅ | CPU temps, load, and utilization. | |
GET |
/api/v1/metrics/memory |
✅ | Memory totals and usage metrics. | |
GET |
/api/v1/metrics/disk |
✅ | Disk capacity, inode usage, and IO stats. | |
GET |
/api/v1/metrics/host |
✅ | Host metadata (OS, uptime, kernel, etc.). | |
GET |
/api/v1/metrics/smart |
✅ | S.M.A.R.T. drive health information. | |
GET |
/api/v1/metrics/net |
✅ | Interface-level network throughput. | |
GET |
/api/v1/metrics/docker |
✅ | Docker container metrics. | Use ?all=true to include stopped containers. |
All responses share the same envelope:
Collectors can partially fail; when that happens the API responds with HTTP 207 Multi-Status and fills errors with detailed reasons so you can alert without dropping other metric data.
Our API is documented in accordance with the OpenAPI spec.
You can find the OpenAPI specifications in openapi.yml
We welcome contributions! If you would like to contribute, please read the CONTRIBUTING.md file for more information.
Capture is licensed under AGPLv3. You can find the license in the LICENSE file.
{ "data": { // collector-specific payload }, "capture": { "version": "1.0.0", "mode": "release" }, "errors": [ // optional array of error messages if any collectors failed, can be null ], }