VMware Monitor (Read-Only)
Safe, read-only VMware vCenter and ESXi monitoring skill. Query your entire VMware infrastructure using natural language through any AI coding assistant — without risk of accidental modifications.
Code-level safety: This is an independent repository (zw008/VMware-Monitor). No destructive code paths exist — no power off, delete, create, reconfigure, snapshot-create/revert/delete, clone, or migrate functions are present in the codebase. For full operations, use the separate VMware-AIops repo. Install: clawhub install vmware-aiops
When to Use This Skill
- Query VM, host, datastore, cluster, and network inventory
- Check health status, active alarms, hardware sensors, and event logs
- View VM details and existing snapshot lists (read-only)
- Run scheduled log scanning with webhook notifications (Slack, Discord)
- You need zero-risk monitoring — no accidental power-off, delete, or reconfigure possible
Quick Install
Works with Claude Code, Cursor, Codex, Gemini CLI, Trae, Kimi, and 30+ AI agents:
# Via ClawHub (recommended)
clawhub install vmware-monitor
# Via Skills.sh
npx skills add zw008/VMware-Monitor
Claude Code
/plugin marketplace add zw008/VMware-Monitor
/plugin install vmware-monitor
/vmware-monitor:vmware-monitor
Usage Mode: MCP First, CLI Fallback
Default: MCP mode — vmware-monitor runs as an MCP Server registered in Claude Code. All monitoring queries go through MCP tool calls directly, no manual CLI needed.
Fallback: CLI mode — only when MCP connection fails (server crash, config error, etc.), switch to CLI commands via vmware-monitor in the terminal.
MCP Tools (7 tools, all read-only)
| MCP Tool |
Description |
Equivalent CLI |
list_virtual_machines |
List all VMs |
vmware-monitor inventory vms |
list_esxi_hosts |
List ESXi hosts |
vmware-monitor inventory hosts |
list_all_datastores |
List datastores |
vmware-monitor inventory datastores |
list_all_clusters |
List clusters |
vmware-monitor inventory clusters |
get_alarms |
Active alarms |
vmware-monitor health alarms |
get_events |
Recent events |
vmware-monitor health events |
vm_info |
VM details |
vmware-monitor vm info <name> |
All tools accept optional target parameter (e.g., "home-esxi", "prod-vcenter").
MCP Setup (Claude Code)
Add to ~/.claude/settings.json:
{
"mcpServers": {
"vmware-monitor": {
"command": "/path/to/VMware-Monitor/.venv/bin/python",
"args": ["-m", "mcp_server"],
"cwd": "/path/to/VMware-Monitor",
"env": {
"VMWARE_MONITOR_CONFIG": "~/.vmware-monitor/config.yaml"
}
}
}
}
When to Fall Back to CLI
- MCP server fails to start or crashes mid-session
- Need daemon/scan features not exposed via MCP (
scan now, daemon start)
- Debugging connection issues (CLI gives more verbose output)
# Activate venv and run CLI
source /path/to/VMware-Monitor/.venv/bin/activate
vmware-monitor inventory vms --target home-esxi
Architecture
User (Natural Language)
↓
AI CLI Tool (Claude Code / Gemini / Codex / Aider / Continue / Trae / Kimi)
↓
├─ MCP mode (default): MCP Server (stdio) ──→ pyVmomi ──→ vSphere API
│
└─ CLI fallback: vmware-monitor CLI ──→ pyVmomi ──→ vSphere API
↓
vCenter Server ──→ ESXi Clusters ──→ VMs
or
ESXi Standalone ──→ VMs
First Interaction: Environment Selection
When the user starts a conversation, always ask first:
- Which environment do they want to monitor? (vCenter Server or standalone ESXi host)
- Which target from their config? (e.g.,
prod-vcenter, lab-esxi)
- If no config exists yet, guide them through creating
~/.vmware-monitor/config.yaml
Capabilities (Read-Only)
1. Inventory
| Feature |
vCenter |
ESXi |
Details |
| List VMs |
✅ |
✅ |
Name, power state, CPU, memory, guest OS, IP |
| List Hosts |
✅ |
⚠️ Self only |
CPU cores, memory, ESXi version, VM count, uptime |
| List Datastores |
✅ |
✅ |
Capacity, free/used, type (VMFS/NFS), usage % |
| List Clusters |
✅ |
❌ |
Host count, DRS/HA status |
| List Networks |
✅ |
✅ |
Network name, associated VM count |
2. Health & Monitoring
| Feature |
vCenter |
ESXi |
Details |
| Active Alarms |
✅ |
✅ |
Severity, alarm name, entity, timestamp |
| Event/Log Query |
✅ |
✅ |
Filter by time range, severity; 50+ event types |
| Hardware Sensors |
✅ |
✅ |
Temperature, voltage, fan status |
| Host Services |
✅ |
✅ |
hostd, vpxa running/stopped status |
Monitored Event Types:
| Category |
Events |
| VM Failures |
VmFailedToPowerOnEvent, VmDiskFailedEvent, VmFailoverFailed |
| Host Issues |
HostConnectionLostEvent, HostShutdownEvent, HostIpChangedEvent |
| Storage |
DatastoreCapacityIncreasedEvent, SCSI high latency |
| HA/DRS |
DasHostFailedEvent, DrsVmMigratedEvent, DrsSoftRuleViolationEvent |
| Auth |
UserLoginSessionEvent, BadUsernameSessionEvent |
3. VM Info & Snapshot List (Read-Only)
| Feature |
Details |
| VM Info |
Name, power state, guest OS, CPU, memory, IP, VMware Tools, disks, NICs |
| Snapshot List |
List existing snapshots with name and creation time (no create/revert/delete) |
4. Scheduled Scanning & Notifications
| Feature |
Details |
| Daemon |
APScheduler-based, configurable interval (default 15 min) |
| Multi-target Scan |
Sequentially scan all configured vCenter/ESXi targets |
| Scan Content |
Alarms + Events + Host logs (hostd, vmkernel, vpxd) |
| Log Analysis |
Regex pattern matching: error, fail, critical, panic, timeout |
| Webhook |
Slack, Discord, or any HTTP endpoint |
FORBIDDEN Operations — DO NOT EXIST IN CODEBASE
These operations cannot be performed with this skill — zero destructive code paths exist:
- ❌
vm power-on/off, vm reset, vm suspend
- ❌
vm create/delete/reconfigure
- ❌
vm snapshot-create/revert/delete
- ❌
vm clone/migrate
Direct users to VMware-AIops (clawhub install vmware-aiops) for these.
Safety Features
| Feature |
Details |
| Code-Level Isolation |
Independent repository — zero destructive functions in codebase |
| Audit Trail |
All queries logged to ~/.vmware-monitor/audit.log (JSONL) |
| Password Protection |
.env file loading with permission check (warn if not 600) |
| SSL Self-signed Support |
disableSslCertValidation for ESXi 8.0 self-signed certs |
Version Compatibility
| vSphere Version |
Support |
Notes |
| 8.0 / 8.0U1-U3 |
✅ Full |
pyVmomi 8.0.3+ |
| 7.0 / 7.0U1-U3 |
✅ Full |
All read-only APIs supported |
| 6.7 |
✅ Compatible |
Backward-compatible, tested |
| 6.5 |
✅ Compatible |
Backward-compatible, tested |
pyVmomi auto-negotiates the API version during SOAP handshake — no manual configuration needed.
Supported AI Platforms
| Platform |
Status |
Config File |
| Claude Code |
✅ Native Skill |
plugins/.../SKILL.md |
| Gemini CLI |
✅ Extension |
gemini-extension/GEMINI.md |
| OpenAI Codex CLI |
✅ Skill + AGENTS.md |
codex-skill/AGENTS.md |
| Aider |
✅ Conventions |
codex-skill/AGENTS.md |
| Continue CLI |
✅ Rules |
codex-skill/AGENTS.md |
| Trae IDE |
✅ Rules |
trae-rules/project_rules.md |
| Kimi Code CLI |
✅ Skill |
kimi-skill/SKILL.md |
| MCP Server |
✅ MCP Protocol |
mcp_server/ |
| Python CLI |
✅ Standalone |
N/A |
CLI Reference
# Inventory
vmware-monitor inventory vms [--target <name>]
vmware-monitor inventory hosts [--target <name>]
vmware-monitor inventory datastores [--target <name>]
vmware-monitor inventory clusters [--target <name>]
# Health
vmware-monitor health alarms [--target <name>]
vmware-monitor health events [--hours 24] [--severity warning]
# VM Info (read-only)
vmware-monitor vm info <vm-name>
vmware-monitor vm snapshot-list <vm-name>
# Scanning & Daemon
vmware-monitor scan now [--target <name>]
vmware-monitor daemon start
vmware-monitor daemon stop
vmware-monitor daemon status
Setup
# 1. Install via uv (recommended) or pip
uv tool install vmware-monitor
# Or: pip install vmware-monitor
# 2. Configure
mkdir -p ~/.vmware-monitor
vmware-monitor init # generates config.yaml and .env templates
chmod 600 ~/.vmware-monitor/.env
# Edit ~/.vmware-monitor/config.yaml and .env with your target details
Development Install
git clone https://github.com/zw008/VMware-Monitor.git
cd VMware-Monitor
uv venv && source .venv/bin/activate
uv pip install -e .
License
MIT
1---2name: vmware-monitor3description: VMware vCenter/ESXi read-only monitoring skill. Code-level enforced safety — no destructive operations exist in this codebase. Query inventory, check health/alarms/events, view VM info and snapshots, scan logs.4---5
6# VMware Monitor (Read-Only)
7
8Safe, read-only VMware vCenter and ESXi monitoring skill. Query your entire VMware infrastructure using natural language through any AI coding assistant — without risk of accidental modifications.
9
10> **Code-level safety**: This is an independent repository (`zw008/VMware-Monitor`). No destructive code paths exist — no power off, delete, create, reconfigure, snapshot-create/revert/delete, clone, or migrate functions are present in the codebase. For full operations, use the separate [VMware-AIops](https://github.com/zw008/VMware-AIops) repo. Install: `clawhub install vmware-aiops`
11
12## When to Use This Skill
13
14- Query VM, host, datastore, cluster, and network inventory
15- Check health status, active alarms, hardware sensors, and event logs
16- View VM details and existing snapshot lists (read-only)
17- Run scheduled log scanning with webhook notifications (Slack, Discord)
18- **You need zero-risk monitoring** — no accidental power-off, delete, or reconfigure possible
19
20## Quick Install
21
22Works with Claude Code, Cursor, Codex, Gemini CLI, Trae, Kimi, and 30+ AI agents:
23
24```bash
25# Via ClawHub (recommended)
26clawhub install vmware-monitor
27
28# Via Skills.sh
29npx skills add zw008/VMware-Monitor
30```
31
32### Claude Code
33
34```
35/plugin marketplace add zw008/VMware-Monitor
36/plugin install vmware-monitor
37/vmware-monitor:vmware-monitor
38```
39
40## Usage Mode: MCP First, CLI Fallback
41
42**Default: MCP mode** — vmware-monitor runs as an MCP Server registered in Claude Code. All monitoring queries go through MCP tool calls directly, no manual CLI needed.
43
44**Fallback: CLI mode** — only when MCP connection fails (server crash, config error, etc.), switch to CLI commands via `vmware-monitor` in the terminal.
45
46### MCP Tools (7 tools, all read-only)
47
48| MCP Tool | Description | Equivalent CLI |
49|----------|-------------|----------------|
50| `list_virtual_machines` | List all VMs | `vmware-monitor inventory vms` |
51| `list_esxi_hosts` | List ESXi hosts | `vmware-monitor inventory hosts` |
52| `list_all_datastores` | List datastores | `vmware-monitor inventory datastores` |
53| `list_all_clusters` | List clusters | `vmware-monitor inventory clusters` |
54| `get_alarms` | Active alarms | `vmware-monitor health alarms` |
55| `get_events` | Recent events | `vmware-monitor health events` |
56| `vm_info` | VM details | `vmware-monitor vm info <name>` |
57
58All tools accept optional `target` parameter (e.g., `"home-esxi"`, `"prod-vcenter"`).
59
60### MCP Setup (Claude Code)
61
62Add to `~/.claude/settings.json`:
63
64```json
65{
66 "mcpServers": {
67 "vmware-monitor": {
68 "command": "/path/to/VMware-Monitor/.venv/bin/python",
69 "args": ["-m", "mcp_server"],
70 "cwd": "/path/to/VMware-Monitor",
71 "env": {
72 "VMWARE_MONITOR_CONFIG": "~/.vmware-monitor/config.yaml"
73 }
74 }
75 }
76}
77```
78
79### When to Fall Back to CLI
80
81- MCP server fails to start or crashes mid-session
82- Need daemon/scan features not exposed via MCP (`scan now`, `daemon start`)
83- Debugging connection issues (CLI gives more verbose output)
84
85```bash
86# Activate venv and run CLI
87source /path/to/VMware-Monitor/.venv/bin/activate
88vmware-monitor inventory vms --target home-esxi
89```
90
91## Architecture
92
93```
94User (Natural Language)
95 ↓
96AI CLI Tool (Claude Code / Gemini / Codex / Aider / Continue / Trae / Kimi)
97 ↓
98 ├─ MCP mode (default): MCP Server (stdio) ──→ pyVmomi ──→ vSphere API
99 │
100 └─ CLI fallback: vmware-monitor CLI ──→ pyVmomi ──→ vSphere API
101 ↓
102vCenter Server ──→ ESXi Clusters ──→ VMs
103 or
104ESXi Standalone ──→ VMs
105```
106
107## First Interaction: Environment Selection
108
109When the user starts a conversation, **always ask first**:
110
1111. **Which environment** do they want to monitor? (vCenter Server or standalone ESXi host)
1122. **Which target** from their config? (e.g., `prod-vcenter`, `lab-esxi`)
1133. If no config exists yet, guide them through creating `~/.vmware-monitor/config.yaml`
114
115## Capabilities (Read-Only)
116
117### 1. Inventory
118
119| Feature | vCenter | ESXi | Details |
120|---------|:-------:|:----:|---------|
121| List VMs | ✅ | ✅ | Name, power state, CPU, memory, guest OS, IP |
122| List Hosts | ✅ | ⚠️ Self only | CPU cores, memory, ESXi version, VM count, uptime |
123| List Datastores | ✅ | ✅ | Capacity, free/used, type (VMFS/NFS), usage % |
124| List Clusters | ✅ | ❌ | Host count, DRS/HA status |
125| List Networks | ✅ | ✅ | Network name, associated VM count |
126
127### 2. Health & Monitoring
128
129| Feature | vCenter | ESXi | Details |
130|---------|:-------:|:----:|---------|
131| Active Alarms | ✅ | ✅ | Severity, alarm name, entity, timestamp |
132| Event/Log Query | ✅ | ✅ | Filter by time range, severity; 50+ event types |
133| Hardware Sensors | ✅ | ✅ | Temperature, voltage, fan status |
134| Host Services | ✅ | ✅ | hostd, vpxa running/stopped status |
135
136**Monitored Event Types:**
137
138| Category | Events |
139|----------|--------|
140| VM Failures | `VmFailedToPowerOnEvent`, `VmDiskFailedEvent`, `VmFailoverFailed` |
141| Host Issues | `HostConnectionLostEvent`, `HostShutdownEvent`, `HostIpChangedEvent` |
142| Storage | `DatastoreCapacityIncreasedEvent`, SCSI high latency |
143| HA/DRS | `DasHostFailedEvent`, `DrsVmMigratedEvent`, `DrsSoftRuleViolationEvent` |
144| Auth | `UserLoginSessionEvent`, `BadUsernameSessionEvent` |
145
146### 3. VM Info & Snapshot List (Read-Only)
147
148| Feature | Details |
149|---------|---------|
150| VM Info | Name, power state, guest OS, CPU, memory, IP, VMware Tools, disks, NICs |
151| Snapshot List | List existing snapshots with name and creation time (no create/revert/delete) |
152
153### 4. Scheduled Scanning & Notifications
154
155| Feature | Details |
156|---------|---------|
157| Daemon | APScheduler-based, configurable interval (default 15 min) |
158| Multi-target Scan | Sequentially scan all configured vCenter/ESXi targets |
159| Scan Content | Alarms + Events + Host logs (hostd, vmkernel, vpxd) |
160| Log Analysis | Regex pattern matching: error, fail, critical, panic, timeout |
161| Webhook | Slack, Discord, or any HTTP endpoint |
162
163## FORBIDDEN Operations — DO NOT EXIST IN CODEBASE
164
165These operations **cannot** be performed with this skill — zero destructive code paths exist:
166
167- ❌ `vm power-on/off`, `vm reset`, `vm suspend`
168- ❌ `vm create/delete/reconfigure`
169- ❌ `vm snapshot-create/revert/delete`
170- ❌ `vm clone/migrate`
171
172Direct users to **VMware-AIops** (`clawhub install vmware-aiops`) for these.
173
174## Safety Features
175
176| Feature | Details |
177|---------|---------|
178| Code-Level Isolation | Independent repository — zero destructive functions in codebase |
179| Audit Trail | All queries logged to `~/.vmware-monitor/audit.log` (JSONL) |
180| Password Protection | `.env` file loading with permission check (warn if not 600) |
181| SSL Self-signed Support | `disableSslCertValidation` for ESXi 8.0 self-signed certs |
182
183## Version Compatibility
184
185| vSphere Version | Support | Notes |
186|----------------|---------|-------|
187| 8.0 / 8.0U1-U3 | ✅ Full | pyVmomi 8.0.3+ |
188| 7.0 / 7.0U1-U3 | ✅ Full | All read-only APIs supported |
189| 6.7 | ✅ Compatible | Backward-compatible, tested |
190| 6.5 | ✅ Compatible | Backward-compatible, tested |
191
192> pyVmomi auto-negotiates the API version during SOAP handshake — no manual configuration needed.
193
194## Supported AI Platforms
195
196| Platform | Status | Config File |
197|----------|--------|-------------|
198| Claude Code | ✅ Native Skill | `plugins/.../SKILL.md` |
199| Gemini CLI | ✅ Extension | `gemini-extension/GEMINI.md` |
200| OpenAI Codex CLI | ✅ Skill + AGENTS.md | `codex-skill/AGENTS.md` |
201| Aider | ✅ Conventions | `codex-skill/AGENTS.md` |
202| Continue CLI | ✅ Rules | `codex-skill/AGENTS.md` |
203| Trae IDE | ✅ Rules | `trae-rules/project_rules.md` |
204| Kimi Code CLI | ✅ Skill | `kimi-skill/SKILL.md` |
205| MCP Server | ✅ MCP Protocol | `mcp_server/` |
206| Python CLI | ✅ Standalone | N/A |
207
208## CLI Reference
209
210```bash
211# Inventory
212vmware-monitor inventory vms [--target <name>]
213vmware-monitor inventory hosts [--target <name>]
214vmware-monitor inventory datastores [--target <name>]
215vmware-monitor inventory clusters [--target <name>]
216
217# Health
218vmware-monitor health alarms [--target <name>]
219vmware-monitor health events [--hours 24] [--severity warning]
220
221# VM Info (read-only)
222vmware-monitor vm info <vm-name>
223vmware-monitor vm snapshot-list <vm-name>
224
225# Scanning & Daemon
226vmware-monitor scan now [--target <name>]
227vmware-monitor daemon start
228vmware-monitor daemon stop
229vmware-monitor daemon status
230```
231
232## Setup
233
234```bash
235# 1. Install via uv (recommended) or pip
236uv tool install vmware-monitor
237# Or: pip install vmware-monitor
238
239# 2. Configure
240mkdir -p ~/.vmware-monitor
241vmware-monitor init # generates config.yaml and .env templates
242chmod 600 ~/.vmware-monitor/.env
243# Edit ~/.vmware-monitor/config.yaml and .env with your target details
244```
245
246### Development Install
247
248```bash
249git clone https://github.com/zw008/VMware-Monitor.git
250cd VMware-Monitor
251uv venv && source .venv/bin/activate
252uv pip install -e .
253```
254
255## License
256
257MIT