# infmap - Infrastructure Map A Dropshell template that provides a web dashboard showing the status of your servers. It SSHes into configured servers periodically to collect system information and displays it in an attractive dark-themed web UI. ## What It Collects - **System**: hostname, OS, kernel, architecture, uptime - **Hardware**: motherboard make/model/version, BIOS version/date - **CPU**: model, cores, sockets, threads, live usage % - **Memory**: total, used, available, live usage % - **Storage**: physical disks, mounted filesystems with usage % - **GPUs**: all detected graphics/3D/display adapters - **Network**: all interfaces with IPv4/IPv6, MAC, state, speed, driver - **Routing**: default gateway and interface - **DNS**: configured nameservers - **Tailscale**: IP and hostname (if installed) All information is gathered without root access using `/sys/class/dmi/id/`, `lscpu`, `/proc/meminfo`, `lspci`, `ip addr`, etc. ## Architecture Single Docker container running a Python Flask app: - **Collector thread**: SSHes into servers on a schedule, runs a gather script, stores results in SQLite - **Web server**: Serves the dashboard on a configurable HTTP port Data is persisted in a Docker volume (`${CONTAINER_NAME}_data`). ## Setup ### 1. Create the service ```bash dropshell create-service infmap ``` ### 2. Configure Edit `service.env`: | Variable | Default | Description | |---|---|---| | `CONTAINER_NAME` | `infmap` | Docker container/project name | | `SSH_USER` | `root` | Dropshell SSH user for this service | | `WEB_PORT` | `8080` | HTTP port for the web dashboard | | `SSH_KEY_PATH` | `/root/.ssh/id_ed25519` | Host path to SSH private key for connecting to monitored servers | | `COLLECTION_INTERVAL` | `300` | Seconds between collection runs | | `MAX_CONCURRENT_SSH` | `5` | Max simultaneous SSH connections | Edit `infrastructure.conf` to define your servers: ``` Production root@prod-web-01 https://web01.example.com root@prod-db-01 deploy@prod-app-01 https://app01.example.com:8080 Development deploy@dev-01 deploy@dev-02 ``` - Group names are freeform labels (no indentation) - Servers are indented with `USERNAME@HOSTNAME [URL]` - An optional URL after the host adds a clickable link on the dashboard - Lines starting with `#` are comments ### 3. Install ```bash dropshell install ``` The dashboard will be available at `http://:`. ## Web Dashboard - Servers displayed in cards grouped by group name, sorted by primary IP - Each card shows hostname, IP, OS, and color-coded usage bars for CPU, RAM, and disk - Green: < 60% - Yellow: 60-75% - Orange: 75-90% - Red: > 90% - Click a card to expand full hardware and network details - Page auto-refreshes every 60 seconds ## API - `GET /` - Web dashboard - `GET /api/servers` - JSON array of all servers with full details