netops-asset-manager
Manage IT infrastructure assets (routers, switches, servers, GPU clusters) through a Go + Vue 3 platform with real-time health probing, SSH remote control, configuration backup, bulk import, network topology visualization, and PM2 process management. Supports H3C, Huawei, Cisco, MikroTik, Ruijie, DCN, and Linux. Use when the user asks about IT asset management, network device operations, infrastructure monitoring, SSH device control, or development on this Go + Vue 3 platform.
install
source · Clone the upstream repo
git clone https://github.com/Boos4721/netops-asset-manager-skill
Claude Code · Install into ~/.claude/skills/
git clone --depth=1 https://github.com/Boos4721/netops-asset-manager-skill ~/.claude/skills/boos4721-netops-asset-manager-skill-netops-asset-manager
manifest:
SKILL.mdsource content
NetOps Asset Manager
Go + Vue 3 IT infrastructure asset management platform. Single binary deployment with embedded frontend.
Capabilities
- Device Management: CRUD for network devices with vendor auto-detection (H3C, Huawei, Cisco, MikroTik, Ruijie, DCN, Linux), SSH credential storage, and bulk Excel/CSV import.
- Health Monitoring: Background ICMP ping + TCP:22 probing every 5 minutes; auto-updates device online/offline status.
- SSH Operations: Native Go SSH client for remote reboot and running-config backup with vendor-aware commands.
- Network Discovery: Nmap subnet scanning to find new devices.
- AI Assistant: OpenClaw chat with intent-based asset auto-registration.
- Topology Visualization: Interactive vis-network graph of device connections.
- PM2 Management: Monitor, restart, stop, and deploy PM2 processes across machines.
- Model Management: CRUD for AI model configs synced to OpenClaw.
- System Deployment: One-click Docker, vLLM, and llama.cpp deployment.
Architecture
backend/ # Go (Gin + Ent ORM) ├── cmd/server/main.go # Server entry point ├── cmd/migrate/main.go # Data migration tool ├── ent/schema/ # Database models └── internal/ ├── auth/ # JWT + bcrypt + RBAC middleware ├── handler/ # API handlers (13 files) ├── router/ # Route registration ├── service/health/ # ICMP/TCP prober + scheduler ├── service/ssh/ # SSH client, reboot, backup ├── service/importer/ # Excel parser └── embedded/ # Frontend embed.FS frontend/ # Vue 3.4 + Vite 5 + TailwindCSS ├── src/stores/ # Pinia state management ├── src/views/ # 8 view pages └── vite.config.ts
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | | Public | Login, returns JWT |
| GET | | Bearer | List devices |
| POST | | operator+ | Add device |
| PUT | | operator+ | Update device |
| DELETE | | operator+ | Delete device |
| POST | | operator+ | SSH reboot |
| POST | | operator+ | SSH config backup |
| POST | | operator+ | Bulk Excel import |
| GET | | Bearer | Dashboard statistics |
| POST | | operator+ | Nmap subnet scan |
| GET/POST/DELETE | | Bearer/operator+ | Topology links |
| GET/POST/PUT/DELETE | | Bearer/root | AI model config |
| GET/POST | | Bearer/operator+ | PM2 management |
| POST | | Bearer | AI assistant |
| GET | | Bearer | System info |
Safe Operation Guidelines
SSH Reboot (POST /api/inventory/reboot/:ip
)
POST /api/inventory/reboot/:ip- Verify the target device IP and confirm intent before calling this endpoint — reboots are immediate and non-reversible.
- The SSH connection drops on success (expected). A
response means the reboot command was sent.200 - Verify recovery: wait 2–5 minutes, then check
for the device's health status to confirm it came back online.GET /api/inventory - If the device stays offline: check physical connectivity, SSH credentials, and console access. The health prober will update status within one probe interval (default 5 min).
Config Backup (POST /api/inventory/backup/:ip
)
POST /api/inventory/backup/:ip- Confirm the device vendor is correct in the inventory — wrong vendor → wrong command → empty or garbled output.
- After backup, verify the response contains configuration text (not an error or empty string).
- Backups are stored in PostgreSQL
table; querybackup
or check the database directly to confirm persistence.GET /api/inventory
Bulk Import (POST /api/inventory/import
)
POST /api/inventory/import- Validate the Excel/CSV file structure before uploading: required columns are IP, vendor, and device name.
- Import is additive — existing devices with the same IP are updated, not duplicated.
- Review the response for per-row success/failure counts. Fix rejected rows and re-import only those.
Error Recovery
- SSH timeout (
default 10s): increase timeout inSSH_CONNECT_TIMEOUT
or verify device is reachable viaconfig.yaml
.ping - Database connection failure: check
inDATABASE_URL
and verify PostgreSQL is running (config.yaml
).systemctl status postgresql - Health prober not updating: confirm the backend process is running and
is set. Check logs for ICMP permission errors (may needPROBE_INTERVAL
).cap_net_raw
Deployment
Quick Start
# Prerequisites: Go 1.26+, Node.js 22+, PostgreSQL 15+ createdb netops # Option A: Run from source cd frontend && npm install --legacy-peer-deps && cd .. make run # Terminal 1: backend on :8081 make dev-frontend # Terminal 2: frontend on :5173 # Option B: Single binary make build ./netops # → http://localhost:8081 (default: admin / admin)
Docker
make docker-build docker run -p 8081:8081 \ -e JWT_SECRET="secret" \ -v ~/.openclaw:/root/.openclaw \ netops-asset-manager:latest
Configuration
config.yaml (env var overrides via Viper):
| Key | Default | Description |
|---|---|---|
| 8081 | Listen port |
| postgres://... | PostgreSQL connection |
| (change me) | JWT signing key |
| 24h | Token TTL |
| 5m | Health probe interval |
| 10s | SSH connection timeout |
Vendor → Driver Mapping
| Vendor | Driver | Config Command |
|---|---|---|
| H3C | hp_comware | |
| Huawei | huawei | |
| Cisco | cisco_ios | |
| MikroTik | mikrotik_routeros | |
| Linux | linux | |
References
— Automation implementation guide (Go SSH client usage, adding vendors)references/automation.md
— Vendor command reference (switches, routers, firewalls, GPUs, storage)references/vendors.md
— System dependency guide (Go, Node, PostgreSQL, OS-specific install)references/dependencies.md
— SNMP OID reference for polling fallbackreferences/snmp.md