vastai-observability
Monitor Vast.ai GPU instance health, utilization, and costs. Use when setting up monitoring dashboards, configuring alerts, or tracking GPU utilization and spending. Trigger with phrases like "vastai monitoring", "vastai metrics", "vastai observability", "monitor vastai", "vastai alerts". '
npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill vastai-observability --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Vast.ai Observability ## Overview Monitor Vast.ai GPU instance health, utilization, and costs. Key metrics: GPU utilization (idle GPUs waste $0.20-$4.00/hr), instance uptime, training progress, cost accumulation, and spot preemption events. ## Prerequisites - Vast.ai account with active instances - `vastai` CLI installed - Optional: Prometheus, Grafana, or Datadog for dashboarding ## Instructions ### Step 1: Instance Metrics Collector ```python import subprocess, json, time from datetime import datetime class VastMetricsCollector: def __init__(self, output_file="vast_metrics.jsonl"): self.output_file = output_file def collect(self): result = subprocess.run( ["vastai", "show", "instances", "--raw"], capture_output=True, text=True) instances = json.loads(result.stdout) metrics = { "timestamp": datetime.utcnow().isoformat(), "total_instances": len(instances), "running": 0, "total_hourly_cost": 0, "instances": [], } for inst in instances: status = inst.get("actual_status", "unknown") dph = inst.get("dph_total", 0) if status == "running": metrics["running"] += 1 metrics["total_hourly_cost"] += dph metrics["instances"].append({ "id": inst["id"], "gpu": inst.get("gpu_name"), "status": s
- Overview
- Prerequisites
- Instructions
- Step 1: Instance Metrics Collector
- Step 2: Alert Conditions
- Step 3: Remote GPU Monitoring
- Step 4: Prometheus Exporter (Optional)
- Output
- Error Handling
- Resources
- Next Steps
- Examples
SSH into instance and collect nvidia-smi metrics ssh -p $PORT root@$HOST "nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,temperature.gpu,power.draw --format=csv,noheader,nounits"
What does the vastai-observability skill do?
Monitor Vast.ai GPU instance health, utilization, and costs. Use when setting up monitoring dashboards, configuring alerts, or tracking GPU utilization and spending. Trigger with phrases like "vastai monitoring", "vastai metrics", "vastai observability", "monitor vastai", "vastai alerts". '
How do I install it?
Run `npx skills add jeremylongshore/claude-code-plugins-plus-skills --skill vastai-observability --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From jeremylongshore/claude-code-plugins-plus-skills, a repository with 2,630 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.