Getting Started with Vitals
Welcome to Vitals! This guide will take you from installation to monitoring your first application in minutes.
Prerequisites
Before you begin, ensure you have:
Visual Studio Code (v1.94.0 or higher)
Prometheus (running locally or accessible via network)
Don't have Prometheus? Run it quickly with Docker:
bashdocker run -p 9090:9090 prom/prometheus
Installation
Option A: Install from Marketplace
- Open VS Code.
- Go to the Extensions view (
Ctrl+Shift+X). - Search for
Vitals. - Click Install.
Option B: Build from Source
Clone the repository:
bashgit clone https://github.com/theaniketraj/vitals.git cd vitalsInstall dependencies:
bashnpm installBuild the project:
bashnpm run buildPress
F5to launch the extension in debug mode.
Configuration
By default, Vitals tries to connect to http://localhost:9090. If your Prometheus server is elsewhere:
- Open Settings (
Ctrl+,). - Search for
Vitals. - Edit Vitals: Prometheus Url to match your server (e.g.,
http://my-server:9090).
Your First Dashboard
Open the Dashboard:
- Press
Ctrl+Shift+Pto open the Command Palette. - Type
Vitals: Open Vitalsand press Enter.
- Press
Explore the UI:
- Top Bar: Shows the "Live" status indicator.
- KPI Cards: Quick stats on Request Rate, Error Rate, and Latency.
- Main Chart: A real-time area chart visualizing your metrics.
- Log Stream: A terminal-like view of your application logs.
- Alerts Panel: A list of active firing or pending alerts.
Interact:
- Hover over the chart to see precise values.
- Resize the VS Code panel to see the responsive layout adapt.
Troubleshooting Common Issues
- "Connection Refused": Ensure your Prometheus server is running and the URL in settings is correct.
- Empty Charts: Check if your Prometheus instance is actually scraping data. You can verify this by visiting
http://localhost:9090/targets.
Next Steps
- Customize your metrics in
src/data/fetchMetrics.ts. - Set up custom alert rules in your Prometheus configuration.
- Read the Architecture Guide to understand how it works under the hood.