PerformanceMonitor 标志

PerformanceMonitor

社区
erikdarlingdata

Free, open-source SQL Server and Postgres performance monitoring. Collectors, real-time alerts, graphical plan viewer, MCP server for AI analysis. Supports SQL 2016-2025, Azure SQL, AWS RDS, Postgres, Aurora Postgres.

发布者erikdarlingdata
代码仓库PerformanceMonitor
语言C#
复刻数
95
星标数
506
可用工具
0
传输类型stdio
许可协议MIT
链接
  • 将工具接入 AI 工作流

    PerformanceMonitor 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 506 个 Star 和 95 个 Fork。

SQL Server Performance Monitor

Free, open-source monitoring that replaces the tools charging you thousands per server per year. Specialized collectors, real-time alerts, and a built-in MCP server for AI analysis. Nothing phones home. Your data stays on your server and your machine.

Supported: SQL Server 2016–2025 | Azure SQL Managed Instance | AWS RDS for SQL Server | Azure SQL Database (Lite and Darling)

Fleet overview: nine servers at a glance, one flagged Critical with live blocking and deadlocks


Editions

Pick by how you want collection to run — the monitoring brain (collectors, alert engine, plan analysis, MCP tools) is shared across all three at the library level.

Lite — flagshipDarling — headlessDashboard — deprecated
How it runsSingle desktop app monitors remotely, on demandWindows service collects 24/7 into a central store; detached viewer reads it from any seatSQL-Server-installed database + Agent collectors, separate viewer app
Installs on your server?NoNoYes (a PerformanceMonitor database)
Stores dataLocal DuckDB + ParquetBundled PostgreSQL + TimescaleDBIn the target SQL Server
Best forQuick triage, Azure SQL DB, locked-down servers, consultants, firefightingAlways-on monitoring of many servers from one serviceExisting installs only — new deployments should use Lite or Darling
RequiresVIEW SERVER STATE (permissions)VIEW SERVER STATE + a place to run the serviceSQL Agent (Dashboard docs)

⚠️ The "Full" Dashboard edition is deprecated. Existing installs keep working and remain on bug-fix support, but it is no longer the recommended path and — as of v3.3.0 — the Dashboard and its CLI installer are no longer included in release assets. The last shipped builds are in the v3.2.0 release, and both remain buildable from the repo. New deployments should use Lite or Darling. Its docs live with the code: deprecated/Dashboard/README.md (the app, tabs, permissions) and deprecated/Installer/README.md (the CLI database installer).

👉 Not sure? Start with Lite. One download, nothing installed on your server, data flowing in under 5 minutes.

All editions include real-time alerts (system tray + email + webhooks), charts and graphs, dark and light themes, CSV export, and a built-in MCP server for AI-powered analysis with tools like Claude. All release binaries are digitally signed via SignPath — no more Windows SmartScreen warnings.


What People Are Saying

"You guys make us DBAs look like absolute rockstars. I'm over here getting showered with praise, and all I do is use your scripts and follow your advice."

"replaced SentryOne and had it running in 10 minutes"

"I've had enough time to gather data and converse with Claude on this. It helped a lot to zone in on CPU starvation from the hypervisor on which the VM runs. IT team currently investigating the host configuration."


What You Get

🔍 Specialized collectors on configurable schedules — wait stats, query performance, blocking chains, deadlock graphs, memory grants, file I/O, tempdb, perfmon counters, FinOps/capacity, and more. Query text and execution plan collection can be disabled per-collector for sensitive environments.

🚨 Real-time alerts for blocking, deadlocks, and high CPU — system tray notifications, styled HTML emails with full XML attachments, and webhook notifications for external integrations

📊 NOC-style overview with green/yellow/red health cards, auto-refresh, configurable time ranges, and dark/light themes

📋 Graphical plan viewer with native ShowPlan rendering, 30-rule PlanAnalyzer, operator-level cost breakdown, and a standalone mode for opening .sqlplan files without a server connection

💡 Recommendations engine (advise-and-act) — a dedicated Recommendations tab surfaces prioritized findings from your own monitoring data with the reasoning behind each one, and can apply selected fixes directly. Destructive changes (like enabling Read Committed Snapshot Isolation) are gated behind an informed-consent dialog that spells out both the risk of acting and the risk of doing nothing.

🤖 Built-in MCP server with read-only tools for AI analysis — ask Claude Code or Cursor "what are the top wait types on my server?" and get answers from your actual monitoring data

🧰 Community tools installed automatically — sp_WhoIsActive, sp_BlitzLock, sp_HealthParser, sp_HumanEventsBlockViewer

🔒 Your data never leaves — no telemetry, no cloud dependency, no phoning home. Credentials stored in Windows Credential Manager with OS-level encryption.


More Screenshots

Custom dashboards — compose any metric into a chart

A saved custom view charting the HammerDB TPC-C contention story on one server: deadlock rate, wait time by type, latch waits, and transaction throughput

Blocking & deadlocks

Per-server blocking and deadlock trends with the captured blocking chains beneath, under a live workload

FinOps — right-sizing & cost analysis

FinOps utilization efficiency: a right-sizing verdict, CPU and memory headroom, and a 7-day provisioning trend

Recommendations — advise and act

The Recommendations tab: prioritized findings drawn from your own collected metrics, each with the reasoning behind it

Fleet Sweeps — scheduled fleet-wide health with memory

A fleet sweep differencing one server from Healthy to Critical, with per-server verdicts and instrument liveness

Graphical Plan Viewer

Graphical plan viewer with plan insights, runtime summary, wait stats, and operator-level analysis

Alert History

Alert history: blocking, deadlocks, and server-reachability events with values, thresholds, and detail

MCP Server — AI-Powered Analysis

An AI assistant answering a health-check question from the monitor's own collected data over MCP


Quick Start — Lite

  1. Download PerformanceMonitorLite-win-Setup.exe — a self-contained build, so there is no .NET runtime to install first.
  2. Run the installer — it installs to %LocalAppData%\PerformanceMonitorLite, adds Start Menu and Desktop shortcuts, and registers the app under Apps & Features so it shows up in Windows search and can be uninstalled normally. Auto-update is wired in. Your data goes in %LocalAppData%\PerformanceMonitorLite-Data, a separate folder the installer never touches.
  3. Launch from the Start Menu or Desktop shortcut.
  4. Click + Add Server, enter connection details, test, save.
  5. Double-click the server in the sidebar to connect.

Data starts flowing within 1–5 minutes. That's it. No installation on your server, no Agent jobs, no sysadmin required.

Taking the portable ZIP (PerformanceMonitorLite-<version>.zip) instead? It is a self-contained win-x64 build too, so there is nothing to install first — unzip it anywhere and run PerformanceMonitorLite.exe. A stock Windows Server with no .NET on it at all is fine.

That was not always true: through 3.5.0 the ZIP was a portable build with no runtime of its own, and on a machine without .NET it died on the host’s own You must install .NET to run this application before a line of Lite’s code ran. Pinning the ZIP to win-x64 removed the requirement and halved the download — the old build shipped ~537 MB of runtimes\ for macOS, Linux, ARM and musl targets Windows can never load, which cost far more than bundling the runtime does. See Lite/README.md for the detail.

Upgrading from zip? Click Import Settings then Import Data in the sidebar and point both at your old Lite folder. Settings imports server connections, alert thresholds, SMTP config, and schedules. Data imports historical DuckDB + Parquet archives. Auto-update users (installed via Setup.exe) get updates automatically — no manual import needed.

Warning — upgrading an install older than the data-relocation fix: on those versions Lite kept its data inside the install directory, and re-running Setup.exe over an existing install deletes that directory before the new build ever runs. It takes the DuckDB store, the Parquet archive, the logs, and settings.json with it. Upgrade in place instead: the About button in the left sidebar downloads and applies the update without touching your data, or extract the portable ZIP over your existing copy. From this release on, data lives outside the install directory and is moved there automatically on first start, so Setup.exe is safe again. (Your monitored-server list is unaffected either way — it lives in %ProgramData%\PerformanceMonitorLite\config — and so are the passwords in Windows Credential Manager.)

Always On AG? Enable ReadOnlyIntent in the connection settings to route Lite's monitoring queries to a readable secondary, keeping the primary clear. Enable MultiSubnetFailover for multi-subnet failover scenarios.

Lite Collectors

42 collectors run on independent, configurable schedules (the long-running-query completion trace is opt-in and ships disabled):

CollectorDefaultSource
query_snapshots1 minsys.dm_exec_requests + sys.dm_exec_sessions
blocked_process_report1 minXE ring buffer session
waiting_tasks1 minsys.dm_os_waiting_tasks
wait_stats1 minsys.dm_os_wait_stats (deltas)
latch_stats1 minsys.dm_os_latch_stats (deltas)
spinlock_stats1 minsys.dm_os_spinlock_stats (deltas)
cpu_scheduler_stats1 minsys.dm_os_schedulers runnable/blocked/queued task counts (not Azure SQL DB)
long_query_completions1 min (opt-in, ships off)dedicated completion-trace XE (rpc_completed/sql_batch_completed over a duration threshold, plus attention)
query_stats1 minsys.dm_exec_query_stats (deltas)
procedure_stats1 minsys.dm_exec_procedure_stats (deltas)
cpu_utilization1 minsys.dm_os_ring_buffers scheduler monitor
database_states1 minsys.databases state per database — feeds the database offline/unhealthy alert (not Azure SQL DB)
file_io_stats1 minsys.dm_io_virtual_file_stats (deltas)
memory_stats1 minsys.dm_os_sys_memory + memory counters
memory_grant_stats1 minsys.dm_exec_query_memory_grants
tempdb_stats1 minsys.dm_db_file_space_usage + tempdb.sys.database_files (the ROWS files' growth ceiling)
perfmon_stats1 minsys.dm_os_performance_counters (deltas)
deadlocks5 mindedicated PerformanceMonitor_Deadlock XE session (xml_deadlock_report; database_xml_deadlock_report on Azure SQL DB)
dmv_blocking_snapshot1 minsys.dm_os_waiting_tasks + sys.dm_exec_* (always-on blocking fallback when the blocked-process-report XE is unavailable)
ag_replica_states1 minsys.dm_hadr_availability_replica_states + sys.availability_replicas (Availability Group replica health; zero rows without AGs, not Azure SQL DB)
ag_database_replica_states1 minsys.dm_hadr_database_replica_states (per-database send/redo queues, rates, secondary lag; zero rows without AGs, not Azure SQL DB)
session_stats5 minsys.dm_exec_sessions active session tracking
session_summary_stats5 minsys.dm_exec_sessions top app/host/database summary
memory_clerks5 minsys.dm_os_memory_clerks
memory_pressure_events5 minsys.dm_os_ring_buffers RING_BUFFER_RESOURCE_MONITOR
query_store5 minQuery Store DMVs (per database)
plan_correction5 minsys.dm_db_tuning_recommendations + sys.database_automatic_tuning_options (automatic plan correction: FORCE_LAST_GOOD_PLAN enablement plus the engine's live regression recommendations, with the regressed query's text resolved through Query Store)
plan_cache_stats5 minsys.dm_exec_cached_plans (single-use vs reused plan-cache bloat)
system_health_events5 minsystem_health XE ring buffer (not Azure SQL DB)
default_trace_events5 mindefault trace via sys.fn_trace_gettable
job_history5 minmsdb.dbo.sysjobhistory retained job-run history (not Azure SQL DB)
agent_status5 minsys.dm_server_services + msdb.dbo.sysjobschedules (not Azure SQL DB / RDS)
running_jobs5 minmsdb job history with duration vs avg/p95
database_size_stats1 hoursys.master_files + FILEPROPERTY + dm_os_volume_stats
pvs_stats1 hoursys.dm_tran_persistent_version_store_stats + sys.databases (ADR persistent version store size and cleanup state per database; SQL Server 2019+ only, always collected on Azure SQL DB)
query_store_health1 hoursys.database_query_store_options per database (actual vs desired state, readonly_reason, storage used vs cap, cleanup thresholds, runtime-stats interval length; SQL Server 2016+, one row per database with OFF recorded explicitly)
server_propertieson connectSERVERPROPERTY() hardware and licensing metadata
index_object_statsDailysys.dm_db_partition_stats + sys.dm_db_index_usage_stats + sys.dm_db_index_operational_stats
server_configOn connectsys.configurations
database_configOn connectsys.databases
database_scoped_configOn connectDatabase-scoped configurations
trace_flagsOn connectDBCC TRACESTATUS

Darling runs this same shared collector set across a fleet of servers (latch stats, spinlock stats, CPU scheduler, plan cache, and system_health parsing are now part of the shared catalog above, collected by Lite too) — see the Darling collector reference.

Lite Data Storage

All data is stored in %LOCALAPPDATA%\PerformanceMonitorLite-Data\ — a different folder from the install directory (%LOCALAPPDATA%\PerformanceMonitorLite\), so neither an in-app update nor re-running Setup.exe can disturb it. Data from an older install is moved into the new folder automatically the first time this version starts.

  • Hot data in DuckDB 1.5.2 — non-blocking checkpoints, free block reuse, stable file size without periodic resets
  • Archive to Parquet with ZSTD compression (~10x reduction) — automatic monthly compaction keeps file count low (~75 files vs thousands)
  • Retention: 3-month calendar-month rolling window
  • Typical size: ~50–200 MB per server per week

Lite Configuration

FileLocationPurpose
servers.json%ProgramData%\PerformanceMonitorLite\config\ (machine-wide)Server connections, shared across all Windows users on the machine. Passwords stay per-user in Windows Credential Manager. Optional Utility Database per server for community procs installed outside master.
settings.json%LOCALAPPDATA%\PerformanceMonitorLite-Data\config\ (per-user)Retention, MCP server, startup behavior, alert thresholds, SMTP configuration
collection_schedule.json%LOCALAPPDATA%\PerformanceMonitorLite-Data\config\ (per-user)Per-collector enable/disable and frequency
ignored_wait_types.json%LOCALAPPDATA%\PerformanceMonitorLite-Data\config\ (per-user)124 benign wait types excluded by default

When a second Windows user on the same machine launches Lite, they see the shared servers.json immediately. SQL Auth and Entra MFA passwords are scoped to each user's own Credential Manager, so they'll be prompted once per server; Windows Auth works without any prompt.


Quick Start — Darling (headless)

Darling is the always-on edition for teams that want 24/7 collection without a desktop app driving it: a Windows service collects from your servers around the clock into a central PostgreSQL store (TimescaleDB is detected and adopted automatically for compression and chunk-based retention), and a detached WPF viewer reads that store from any seat. It runs the same monitoring brain as Lite — collectors, alert engine, and analysis pipeline shared at the library level — with alerts over email and webhooks (Teams, Slack, PagerDuty, and generic HTTP POST) and the same MCP tool surface available on request. An optional built-in web dashboard (off by default, its own port 5153) serves the fleet overview, per-server drill-down, the scheduled fleet sweep reports, and alert history to any browser — read-only over the collected data, plus seat-gated config writes (saved views, custom alert rules, and the mute-rule API) — so operators can watch the fleet without installing the viewer.

  1. Download PerformanceMonitorDarling-<version>.zip from the latest release — the signed service and viewer with the bundled PostgreSQL + TimescaleDB runtime beside the service exe, so a from-zero install needs no database provisioning.
  2. Copy darling.sample.json to darling.json and add your servers (and optional SMTP / webhook delivery). In managed mode the service unpacks and runs its own PostgreSQL — no external database to set up.
  3. Run the service (console for a trial, or install it as a Windows service). It seeds the store and begins collecting on the same default cadences and retention horizons as a fresh Lite install.
  4. Start the Darling Viewer. It is in the same zip, under viewer\, and install-darling.ps1 leaves a Desktop shortcut. On the service host there is nothing to point at anything: it finds the same darling.json, derives the store connection, and opens on the fleet. For a seat on another machine, run --export-viewer-config on the service host and copy the folder it writes.
  5. Optionally turn on the two off-by-default surfaces: --enable-web serves the browser dashboard on port 5153, --enable-mcp serves the MCP endpoint on 5152. Both take effect live, no restart.

Never done this before? docs/uat-onboarding.md is the ordered path from a downloaded zip to all three surfaces — the WPF viewer, the web dashboard, and MCP — with the log line, HTTP response, or screen that proves each step worked, and the handful of things that reliably catch people out.

Configuration is a single JSON file with no schedule knobs. See the Darling operator guide for the configuration reference, permissions, and operations.


Edition Comparison

CapabilityLiteDarlingDashboard (deprecated)
Target server installationNoneNoneRequired
Runs collectionOn-demand desktop app24/7 Windows serviceSQL Agent on the target
Multi-server from one seatBuilt-inBuilt-in (central store)Per-server install
Data storageDuckDB + Parquet (local)PostgreSQL + TimescaleDB (bundled)SQL Server (on target)
Azure SQL DatabaseSupportedSupportedNot supported
Azure SQL MI / AWS RDSSupportedSupportedSupported
Graphical plan viewerBuilt-in, 30-rule PlanAnalyzerBuilt-in, 30-rule PlanAnalyzerBuilt-in, 30-rule PlanAnalyzer
Standalone plan viewerOpen/paste/drag .sqlplanOpen/paste/drag .sqlplanOpen/paste/drag .sqlplan
Alerts (tray + email + webhooks)YesEmail + webhooks (headless)Yes
ThemesDark and lightDark and lightDark and light
PortabilitySingle executablePortable service + viewer zipServer-bound
MCP server (LLM integration)Built-in (87 tools)On request (151 tools)Built into Dashboard (66 tools)

Tabs

The Lite app and the Darling viewer share the same tab layout (the viewer is Lite's front end reading a Postgres store instead of local DuckDB):

TabContents
Overview2x2 resource chart grid (CPU, Memory, Wait Stats, TempDB) with drill-down
Active QueriesRunning queries with session details, wait types, blocking, DOP, memory grants
Wait StatsFilterable wait statistics chart with delta calculations
CPUSQL Server CPU vs Other Processes over time
MemoryPhysical memory overview, SQL Server memory trend, memory clerk breakdown, memory pressure events
QueriesPerformance trends, top queries and procedures by duration, Query Store integration, query heatmap
File I/ORead/write I/O trends per database file
TempDBSpace usage breakdown and TempDB file I/O
BlockingBlocking/deadlock trends, blocked process reports, deadlock history, visual block-chain & deadlock-graph viewers
PerfmonSelectable SQL Server performance counters over time
ConfigurationServer configuration, database configuration, scoped configuration, trace flags
FinOpsUtilization & provisioning analysis, database resource breakdown, storage growth (7d/30d), idle database detection, index analysis via sp_IndexCleanup, per-object table/index size, growth, usage, and locking/contention analysis, application connections, server inventory, cost optimization recommendations, column-level filtering on all grids
RecommendationsPrioritized findings drawn from collected metrics, grouped into incidents, each card showing the affected database, the recommendation, the reasoning behind it, and a copyable MCP investigation prompt

Both feature auto-refresh, configurable time ranges, chart drill-down to Active Queries, right-click CSV export, system tray integration, dark and light themes, and timezone display options (server time, local time, or UTC). The Darling viewer adds a fleet sidebar and per-server tabs; see Darling/README.md. The deprecated Dashboard's six-tab-group layout is documented in deprecated/Dashboard/README.md.


Alerts & Notifications

Every edition includes a real-time alert engine that monitors for performance issues and sends notifications via system tray balloons (Lite/Dashboard), email, and webhooks.

Alert Types

MetricDefault ThresholdDescription
Blocking5 secondsFires when the longest blocked session exceeds the threshold
Deadlocks1Fires when new deadlocks are detected since the last check
Poison waits100 ms avgFires when any poison wait type exceeds the average-ms-per-wait threshold
Long-running queries5 minutesFires when any query exceeds the elapsed-time threshold
TempDB space80%Fires when TempDB usage exceeds the percentage threshold. Measured against tempdb's growth ceiling (SUM(max_size) over the ROWS files) where there is one, and against the current allocation where the files grow without limit — so the percentage means "distance to the point where tempdb cannot grow further" on every engine
Long-running agent jobs3× averageFires when a job's current duration exceeds a multiple of its historical average
High CPU80%, held for 3 samplesFires when total CPU (SQL + other) is at or above the threshold on 3 consecutive collected samples — about three minutes at the one-minute CPU sample cadence — and resolves after 2 consecutive samples below it. A momentary spike above a steady baseline is detected but is not an incident, so it is not delivered. The count is per SAMPLE, not per alert sweep, so a sweep re-reading a sample it has already seen does not advance it. A CPU reading that stops arriving holds the count where it is rather than announcing a recovery
Volume free space10% or 5 GB freeFires when a monitored volume's free space drops below the percentage or absolute threshold (either check can be disabled). Never fires on Azure SQL Database.
Failed agent job60-minute lookbackFires when a SQL Agent job run fails within the lookback window. Skipped on Azure SQL Database.
Server unreachableN/AFires when a monitored server goes offline or comes back online
Collection stoppedNo run in 30 minFires when collection stalls (Agent/service stopped or collectors erroring). App-computed, so it survives the collector being off; clears with a "Collection Resumed" notice. Never fires on Azure SQL Database; degrades gracefully where msdb is restricted (e.g. AWS RDS).

All thresholds are configurable in Settings.

Poison wait types monitored: THREADPOOL (worker thread exhaustion), RESOURCE_SEMAPHORE (memory grant pressure), and RESOURCE_SEMAPHORE_QUERY_COMPILE (compilation memory pressure). These waits indicate severe resource starvation and should never occur under normal operation.

Notification Channels

  • System tray — balloon notifications with a configurable per-metric cooldown (default: 5 minutes)
  • Email (SMTP) — styled HTML emails with a configurable per-metric cooldown (default: 15 minutes), plus configurable SMTP settings (server, port, SSL, authentication, recipients)
  • Microsoft Teams — styled card messages with color-coded severity indicators sent to Teams channels via incoming webhooks
  • Slack — styled messages with color-coded severity indicators sent to Slack channels via incoming webhooks
  • PagerDuty — native Events API v2 integration that triggers PagerDuty incidents with proper severity mapping (critical/error/warning/info) and automatic incident correlation via dedup_key. Supports both US and EU data centers
  • Generic webhook — HTTP POST to any configurable endpoint for integration with other alerting systems (Opsgenie, n8n, custom automation, etc.)

All cooldown periods are independently configurable in Settings under the Performance Alerts section.

PagerDuty Setup

To receive alerts in PagerDuty:

  1. In PagerDuty, create a service and add an Events API v2 integration
  2. Copy the 32-character Integration Key (routing key)
  3. In Performance Monitor Settings, enable PagerDuty notifications and paste the routing key
  4. Check Use EU data center if your PagerDuty account is in the EU region
  5. Click Send Test Notification to verify the integration

PagerDuty alerts include the metric name, server, current value, threshold, and severity. Repeated alerts for the same incident automatically correlate into a single PagerDuty incident via the dedup_key, preventing alert fatigue.

Email Alerts

Alert emails include:

  • Metric summary — what triggered the alert, current value vs threshold
  • Detail section — recent blocking chains or deadlock participants with query text, wait times, lock modes, database names, and client application
  • XML attachment — full blocked_process_report.xml or deadlock_graph.xml for offline analysis

Alert Behavior

  • Resolved notifications — when a condition clears (e.g., blocking ends), a "Cleared" notification fires
  • Server silencing — right-click a server to acknowledge alerts, silence all alerts, or unsilence
  • Always-on — the alert engine runs independently of which tab is active, including when minimized to the system tray
  • Alert history — Lite logs alerts to DuckDB (config_alert_log); Darling logs to its Postgres store; both are accessible via MCP
  • Alert muting — create rules to suppress specific recurring alerts while still logging them. Rules match on server name, metric type, database, query text, wait type, or job name (AND logic across fields). Access via Settings → Manage Mute Rules, or right-click an alert in the Alert History tab. The context menu offers Mute This Alert (pre-fills server + metric) and Mute Similar Alerts (pre-fills metric only, matching across all servers). Muted alerts appear grayed out and are still recorded for auditability. Rules support optional expiration (1h, 24h, 7 days, or permanent).
  • Alert details — right-click any alert in the Alert History tab and choose View Details for core fields (time, server, metric, value, threshold, notification type, status) plus context-sensitive details that vary by metric.

Agent Job Monitoring

Every edition monitors currently running SQL Agent jobs and flags jobs running longer than expected.

MetricHow It Works
Current durationElapsed time since the job started
Average durationHistorical mean from successful completions in msdb.dbo.sysjobhistory
p95 duration95th percentile from historical completions
Running long flagSet when current duration exceeds the p95 threshold

Lite and Darling query msdb directly on each collection cycle; all editions expose this data through the MCP get_running_jobs tool. Gracefully skipped on Azure SQL Database, AWS RDS for SQL Server, and environments without SQL Server Agent.


MCP Server (LLM Integration)

Every edition includes an embedded Model Context Protocol server that exposes monitoring data to LLM clients like Claude Code and Cursor.

The tools answer from the monitor's own collected store, and that is the boundary worth stating up front: no MCP tool runs SQL an AI client wrote against your monitored servers. The handful of write-capable tools (Darling's view authoring, alert tuning, and server onboarding) change the monitor's own configuration, and the only live contact with a monitored server — the analysis plan fetch and the onboarding connection probe — runs the product's own fixed, read-only queries under the same least-privilege monitoring login the collectors use.

Setup

  1. Enable the MCP server in Settings (checkbox + port, default 5151)
    • The port must be between 1024 and 65535. Ports 0–1023 are well-known privileged ports reserved by the operating system.
    • On save, the app checks whether the chosen port is already in use and warns you if there is a conflict.
    • On startup, the app verifies the port is available before starting the MCP server.
  2. Register with Claude Code:
claude mcp add --transport http --scope user sql-monitor http://localhost:5151/
  1. Open a new Claude Code session and ask questions like:
    • "What servers are being monitored?"
    • "What are the top wait types on my server?"
    • "Are there any blocking or deadlock issues?"
    • "Show me CPU utilization for the last 4 hours"
    • "What are the most expensive queries by CPU?"

Available Tools

Lite exposes 87 tools; Darling exposes 151 (the analysis + data-read surface plus its write tools) on request; the deprecated Dashboard exposes 66 (see deprecated/Dashboard/README.md). Core tools are shared.

CategoryTools
Discoverylist_servers
Healthget_server_summary, get_collection_health, get_daily_summary
Alertsget_alert_history, get_alert_settings, get_mute_rules
Waitsget_wait_stats, get_wait_types, get_wait_trend, get_waiting_tasks
Queriesget_top_queries_by_cpu, get_top_procedures_by_cpu, get_query_store_top, get_query_duration_trend, get_query_trend
Active Queriesget_active_queries
CPUget_cpu_utilization
Memoryget_memory_stats, get_memory_trend, get_memory_clerks, get_memory_grants, get_resource_semaphore
Blockingget_deadlocks, get_deadlock_detail, get_blocked_process_reports, get_blocked_process_xml, get_blocking_trend, get_deadlock_trend
I/Oget_file_io_stats, get_file_io_trend
TempDBget_tempdb_trend
Perfmonget_perfmon_stats, get_perfmon_trend
Jobsget_running_jobs
Configurationget_server_config, get_database_config, get_database_scoped_config, get_query_store_health, get_trace_flags
Server Infoget_server_properties, get_database_sizes
Object/Index Statsget_table_index_sizes, get_index_usage, get_object_locking
Sessionsget_session_stats
System Eventsget_memory_pressure_events
Latches & Spinlocksget_latch_stats, get_spinlock_stats
Plan Cache & Schedulerget_plan_cache_bloat, get_cpu_scheduler_pressure
Long Queriesget_long_query_completions
Default Traceget_default_trace_events
Config Changesget_server_config_changes, get_database_config_changes, get_trace_flag_changes
Health Parserget_health_parser_system_health, get_health_parser_severe_errors, get_health_parser_io_issues, get_health_parser_scheduler_issues, get_health_parser_memory_conditions, get_health_parser_cpu_tasks, get_health_parser_memory_broker, get_health_parser_memory_node_oom
Plan Analysisanalyze_query_plan, analyze_procedure_plan, analyze_query_store_plan, analyze_plan_xml, get_plan_xml
Diagnostic Analysisanalyze_server, get_analysis_facts, compare_analysis, audit_config, get_analysis_findings, mute_analysis_finding

Most tools accept optional server_name and hours_back parameters. If only one server is configured, server_name is auto-resolved. Every tool that takes hours_back also takes an optional as_of — an ISO-8601 UTC instant that moves the END of the window off "now", so a past incident is one call (as_of its end, hours_back its length) rather than a very wide window filtered by hand. The MCP server binds to localhost only and does not accept remote connections. (Darling adds windowed-trend and fleet-overview tools plus agent-driven write tools — Custom Views authoring, alert-settings and mute-rule tuning, and bulk add/remove servers — and supports an opt-in LAN endpoint — see Darling/README.md.)


Performance Impact

On Monitored Servers

  • All queries use READ UNCOMMITTED isolation
  • Configurable collection intervals
  • Lite: max 7 concurrent SQL connections, 30-second command timeout
  • Darling: the service collects on the shared default cadences; TimescaleDB compresses the store

Local Resources (Lite)

  • DuckDB: ~50–200 MB per server per week
  • Parquet archives: ~10x compression with ZSTD
  • ScottPlot charts use hardware-accelerated rendering

Troubleshooting

Lite

Application logs are written to the logs/ folder. Collection success/failure is also logged to the collection_log table in DuckDB.

Verbosity is the log_minimum_level key in settings.json (no UI — see Lite/config/settings.sample.json), one of Trace, Debug, Information, Warning, Error, Critical or None. It defaults to Information and is read at startup, so a change needs a restart.

Set it to Debug when you need the per-database collection timing lines — [server] collector [db] => N rows (sql:Nms, duckdb:Nms), one per database per collector per cycle. They are below the default because at that rate they bury the collection failures the log is usually opened for; the aggregate they decompose is in collection_log's duration_ms, which is recorded at every level.

Common issues:

  1. No data after connecting — Wait for the first collection cycle (1–5 minutes). Check logs for connection errors.
  2. Query Store tab empty — Query Store must be enabled on the target database (ALTER DATABASE [YourDB] SET QUERY_STORE = ON).
  3. Blocked process reports empty — Lite attempts to auto-configure the blocked process threshold to 5 seconds via sp_configure. On AWS RDS, sp_configure is not available — set blocked process threshold (s) through an RDS Parameter Group (see Platform Notes below). On Azure SQL Database, the threshold is fixed at 20 seconds and cannot be changed. If you still see no data on other platforms, verify the login has ALTER SETTINGS permission.
  4. Connection failures — Verify network connectivity, firewall rules, and that the login has the required permissions. For Azure SQL Database, use a contained database user with VIEW DATABASE STATE.
  5. FinOps Index Analysis hangs, times out, or returns Msg 229 on sql_expression_dependencies — see FinOps Index Analysis below for the full per-database grant set that fixes both failure modes.

Darling troubleshooting (service logs, store connectivity, permissions) is in the Darling operator guide. Dashboard (Full edition) troubleshooting is in deprecated/Dashboard/README.md.


Authentication

PerformanceMonitor.Common.AuthenticationTypes supports seven authentication types, defined once there and named the same way in every edition. Not every edition connects with all seven, so the table says which does what: Lite offers all of them, while the Darling service builds Windows-integrated or SQL-login connections only and acquires no tokens at all, so its viewer rejects every Azure mode at the credential step.

TypeEditionsInteractive?Credential stored?Where
WindowsLite, DarlingNoNone—
SQL ServerLite, DarlingNoPasswordWindows Credential Manager
Entra ID (MFA)LiteYes, once per sessionNone—
Service PrincipalLiteNoClient secretWindows Credential Manager
Managed IdentityLiteNoNone—
Existing Azure Sign-InLiteNoNone— (established outside the app, e.g. az login)
Device CodeLiteYes, once per sessionNone— (entered in a browser, on any device)

Managed Identity and Service Principal are non-interactive Azure AD (Entra ID) authentication modes, added for fleet onboarding of Azure SQL Database / Managed Instance without a per-server interactive MFA prompt (see #1038). Both map directly to Microsoft.Data.SqlClient's native SqlAuthenticationMethod (ActiveDirectoryServicePrincipal / ActiveDirectoryManagedIdentity) — PerformanceMonitor never acquires, caches, or stores a token itself; the official Microsoft driver handles that internally.

  • Managed Identity requires the machine running the app/service to itself be an Azure resource (VM, App Service, etc.) with a system- or user-assigned managed identity. That identity is then provisioned as a user directly on each target database (see Permissions below). Nothing is stored locally.
  • Service Principal uses an Entra app registration's client id + secret. The client id is non-secret and stored in config; the secret is stored only in Windows Credential Manager, same as a SQL auth password.

Existing Azure Sign-In (Lite only, ActiveDirectoryDefault)

Labelled Azure — Existing Sign-In (az login) in Lite's connection dialog, and added because Entra ID (MFA) cannot be repaired in place (see #3196, #3214). Microsoft.Data.SqlClient forces the Windows account broker (WAM) on for any caller using the driver's own Entra application id, and UseWamBroker is inert in that configuration — so when the broker refuses a sign-in, the app has no browser fallback to reach for. This mode maps to SqlAuthenticationMethod.ActiveDirectoryDefault, whose arm in the driver returns before any MSAL public-client application is constructed, which is the only place a broker is ever attached.

It signs in as whichever Azure identity is already established on the machine and never prompts — the driver hard-codes ExcludeInteractiveBrowserCredential = true, so there is no browser and no account picker. It searches, in order: the AZURE_CLIENT_ID / AZURE_CLIENT_SECRET environment variables, a workload identity, a managed identity, a Visual Studio or VS Code sign-in, an Azure CLI session (az login), an Azure PowerShell session, and an Azure Developer CLI session. Two consequences worth knowing before you pick it:

  • With no Azure sign-in on the machine it fails rather than asking for one. Run az login first. The connection dialog says which of the two failure modes happened — nothing found, or one found and broken — and the log names each source and why it declined.
  • The order is the driver's, not yours. There is no seam to narrow the list: the driver constructs the credential chain itself and this app cannot pass options into it. On a machine with several Azure identities set up, this connects as whichever comes first, which is not necessarily the one you signed into Windows with. When a specific identity matters, use Service Principal, which names it.
  • The log says which one won. Lite records the credential type DefaultAzureCredential actually selected — AzureCliCredential, EnvironmentCredential, ManagedIdentityCredential and so on — so "whichever comes first" is answerable after the fact rather than only a caveat. Expect exactly one such line per run of the app: Azure.Identity reports the selection once per credential instance and the driver caches that instance for the process, so later connections have nothing new to report and say so at Debug. The type name is the only thing recorded; no tenant id, account or scope.

Darling does not offer this mode: the Darling service's connect path builds Windows-integrated or SQL-login connections only and acquires no tokens at all, so its viewer rejects every Azure mode at the credential step.

Not yet confirmed against a live Entra tenant. The mechanism above is read off the pinned Microsoft.Data.SqlClient 7.0.2 and Azure.Identity 1.18.0 sources, and the behaviour is pinned by tests; nobody here has a tenant to run it against. Treat it as worth trying rather than as known to work, and please report what happens.

Device Code (Lite only, ActiveDirectoryDeviceCodeFlow)

Labelled Azure — Device Code (browser on any device) in Lite's connection dialog. It shows a short code and a URL; you open that URL in a browser — on the same machine or on a phone — enter the code, and sign in normally, MFA included. Lite never sees your password, and the browser does not have to be on the machine running Lite.

It exists because the other two Entra paths each depend on something an elevated process cannot reach, and for different reasons (see #3196):

  • Entra ID (MFA) hands sign-in to the Windows account broker (WAM), which cannot reach the interactive user's logon session from a process launched as a different account. It fails with 0x80070520 / unknown_broker_error, and there is no app-side opt-out — ActiveDirectoryAuthenticationProviderOptions.UseWamBroker looks like one and is not.
  • Existing Azure Sign-In reads the credential cached under %USERPROFILE%, which under elevation is the launching account's profile. An az login done in your own session is not there.

Device code has neither dependency. DeviceCodeRequest in Microsoft.Identity.Client POSTs to the tenant's device-code endpoint, invokes the callback with the code, and polls the token endpoint — no broker, no profile, no cached credential. WithBroker governs interactive and silent acquisition and has nothing to say about a device-code request, which is why the mode is broker-free even though the driver attaches a broker to the MSAL application it shares with the other modes.

Two things worth knowing before you pick it:

  • You have about three minutes. That limit is the SQL driver's, not Lite's: its device-code arm builds its own three-minute cancellation and passes that rather than the Connect Timeout-derived one, so raising Connect Timeout does not extend it. Closing the code window gives up and hands the dialog back.
  • It is interactive, so it behaves like Entra ID (MFA) does. The periodic connectivity sweep skips these servers rather than raising a code at nobody, but data collection does not skip them: expect one code window per run of the app, including on an unattended collection cycle shortly after Lite starts, after which the driver's cached token serves the rest of the run. Declining a prompt stops it being raised again until you open the server yourself. It is also not offered in Add Multiple Servers, where one code per server would be a prompt storm of codes that expire faster than they can be entered.
  • Every code window names the server its code is for. That name comes from the token acquisition that produced the code, not from whichever sign-in happened to be in progress, so a window cannot name one server beside another's code. Background reads raise named prompts too; what a background prompt cannot do is hand a waiting dialog back when you close it, because nothing is waiting behind it.
  • Only one device-code sign-in can be in flight at a time, and a second is refused with a message rather than queued. Two sign-ins to the same server describe identically, and there is one slot for the sign-in a window's Cancel belongs to, so the first one's code could be displayed on the second one's window. Finish or close the one on screen and try again.

Darling does not offer this mode, for two reasons rather than one: the Darling service's connect path builds Windows-integrated or SQL-login connections only and acquires no tokens at all, and the service is a headless collector with nobody in front of it to read a code.

Not yet confirmed against a live Entra tenant. The mechanism above is read off the pinned Microsoft.Data.SqlClient 7.0.2 and Microsoft.Identity.Client 4.84.2 sources, and the behaviour is pinned by tests; nobody here has a tenant to run it against. Treat it as worth trying rather than as known to work, and please report what happens.

Credential Profiles (Lite, fleet onboarding)

For a fleet of servers sharing one identity — one managed identity or one service principal used across many Azure SQL databases — Lite has Credential Profiles: a named, reusable credential that any number of server entries can reference instead of each one carrying its own inline auth. Create one under Manage Servers → Credential Profiles…, then point server entries at it. Profiles live in profiles.json alongside servers.json; a Managed Identity profile stores no secret, and Service Principal / SQL Server

将 PerformanceMonitor MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 PerformanceMonitor 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 PerformanceMonitor 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 PerformanceMonitor MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "performancemonitor": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 PerformanceMonitor MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 PerformanceMonitor MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 PerformanceMonitor 帮我完成这项任务吗?
PerformanceMonitor
当然。我已阅读。
以下是我使用 PerformanceMonitor 得到的结果。

常见问题

PerformanceMonitor MCP 服务器有什么用途?

PerformanceMonitor 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 PerformanceMonitor MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 PerformanceMonitor,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 PerformanceMonitor MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 PerformanceMonitor 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 PerformanceMonitor MCP 连接到 TypingMind?

PerformanceMonitor 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

PerformanceMonitor MCP 在 TypingMind 中提供哪些工具?

PerformanceMonitor 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 PerformanceMonitor MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 PerformanceMonitor 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇