Skip to content

Commit 7234289

Browse files
committed
feat: Add application inventory and multi-system support
- Extended inventory.py with SystemIdentity and ApplicationMetadata models - Auto-detect applications running on LXC (Jellyfin, Pi-hole, Ollama, PostgreSQL, etc.) - System identification with hostname + container ID for multi-system setups - New MCP tools: * scan_installed_applications - Auto-detect installed apps * get_inventory - View complete system inventory * add_application_to_inventory - Manual app additions * remove_application_from_inventory - Remove apps * set_system_identity - Configure system identity - New MCP prompt: setup_inventory for interactive onboarding - ApplicationScanner with 17 detection rules and confidence scoring - Documentation: docs/inventory.md with usage guides and examples - Updated README with inventory management section
1 parent 89fe5bb commit 7234289

File tree

6 files changed

+1363
-5
lines changed

6 files changed

+1363
-5
lines changed

README.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Perfect for **home lab enthusiasts**, **self-hosters**, and **DevOps engineers**
2828

2929
### 🚀 **Current Capabilities**
3030

31-
-**MCP Prompts** - Pre-configured workflows for common tasks (security audit, health check, troubleshooting)
31+
-**Smart Inventory Management** - Auto-detect and track applications running on LXC (Jellyfin, Pi-hole, Ollama, PostgreSQL, etc.)
32+
-**Multi-System Support** - Identify systems by hostname + container ID for managing multiple LXCs with one AI
33+
-**MCP Prompts** - Pre-configured workflows for common tasks (security audit, health check, troubleshooting, inventory setup)
3234
-**Docker Compose Stack Management** - Deploy GitOps-style stacks from repos (like Portainer/Komodo)
3335
-**Proxmox LXC Detection** - Automatic virtualization environment detection
3436
-**AI-Powered Log Analysis** - Root cause detection with actionable recommendations
@@ -290,6 +292,86 @@ audit_lxc_network(container_id=103)
290292

291293
---
292294

295+
## 📦 Application Inventory
296+
297+
SystemManager can track what applications are running directly on your LXC container (not just Docker), providing context-aware assistance.
298+
299+
### Initial Setup
300+
301+
Use the interactive **setup_inventory** prompt to configure your system:
302+
303+
```
304+
You: "Let's set up the inventory for this system"
305+
306+
AI will guide you through:
307+
1. System identification (hostname, container ID, type)
308+
2. Auto-scan for installed applications
309+
3. Manual additions if needed
310+
4. Review and save
311+
```
312+
313+
### Auto-Detection
314+
315+
SystemManager can auto-detect these applications:
316+
317+
- **Media Servers**: Jellyfin, Plex
318+
- **Network Services**: Pi-hole, AdGuard Home, WireGuard
319+
- **Databases**: PostgreSQL, MySQL, MariaDB, MongoDB, Redis
320+
- **Web Servers**: Nginx, Apache
321+
- **Home Automation**: Home Assistant
322+
- **Monitoring**: Prometheus, Grafana
323+
- **AI/LLM**: Ollama
324+
- **Other**: Nextcloud, Portainer, and more
325+
326+
### API Examples
327+
328+
```python
329+
# Scan for installed applications
330+
scan_installed_applications(save_to_inventory=True)
331+
332+
# View complete inventory
333+
get_inventory()
334+
# Returns: system identity, applications, Docker stacks
335+
336+
# Manually add an application
337+
add_application_to_inventory(
338+
name="ollama",
339+
app_type="ai-llm",
340+
version="0.1.14",
341+
port=11434,
342+
service_name="ollama",
343+
config_path="/etc/ollama",
344+
notes="Running Llama 3.2 model"
345+
)
346+
347+
# Update system identity (for multi-system setups)
348+
set_system_identity(
349+
hostname="dev1",
350+
container_id="103",
351+
container_type="lxc",
352+
mcp_server_name="dev1-103" # Unique name for this MCP instance
353+
)
354+
```
355+
356+
### Multi-System Management
357+
358+
When managing multiple LXC containers with a single AI:
359+
360+
1. Each system gets a unique identifier: `hostname-containerID` (e.g., `dev1-103`)
361+
2. The inventory tracks what's running on each system
362+
3. AI provides context-aware suggestions based on what you have installed
363+
4. Inventory stored in `/opt/systemmanager/inventory.json` per system
364+
365+
### Benefits
366+
367+
**Context-Aware Help**: AI knows what apps you're running
368+
**Better Troubleshooting**: Targeted recommendations based on your stack
369+
**Documentation**: Auto-generated infrastructure documentation
370+
**Security Audits**: Application-specific security checks
371+
**Performance Analysis**: Understanding resource usage by app
372+
373+
---
374+
293375
## 🐋 Docker Integration
294376

295377
### Docker Compose Stack Management

0 commit comments

Comments
 (0)