QMonitor Hub

Use QMonitor data from AI assistants, Excel, PowerShell and your own tools, without handling credentials.

The QMonitor Hub is a small program you run on your own Windows or Linux computer. You approve it once from QMonitor, then local tools can read the monitoring data of all your organizations through it:

  • AI assistants such as Claude or GitHub Copilot CLI, through the Model Context Protocol (MCP);
  • Excel / Power Query, PowerShell and your own applications, through a local HTTP address.

The hub stores its own access key safely on your computer and renews it automatically, so none of these tools ever needs a QMonitor password or key. Through it they see the same data as the QMonitor dashboards, and while it runs the hub checks your issues every 10 minutes, so your AI assistant can review the new ones and propose fixes.

%%{init: {'theme':'base','flowchart':{'padding':28},'themeVariables':{'primaryTextColor':'#0F172A','lineColor':'#64748B','edgeLabelBackground':'#FFFFFF','clusterBkg':'#F8FAFC','clusterBorder':'#CBD5E1'}}}%%
flowchart LR
    subgraph PC["💻 Your PC"]
        AI["🤖 AI assistant<br/>Claude · Copilot CLI"]:::client
        XL["📊 Excel · PowerShell<br/>your applications"]:::client
        HUB["🧩 QMonitor Hub"]:::hub
        KEY[("🔑 Protected<br/>key store")]:::secret
    end
    QM["☁️ QMonitor<br/>api.qmonitor.app"]:::svc

    AI -- "MCP" --> HUB
    XL -- "http://localhost:5310" --> HUB
    HUB <--> KEY
    HUB == "HTTPS" ==> QM

    classDef client fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E
    classDef hub fill:#EDE9FE,stroke:#7C3AED,stroke-width:2px,color:#2E1065
    classDef secret fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F
    classDef edge fill:#FFE4E6,stroke:#E11D48,stroke-width:2px,color:#881337
    classDef svc fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D
    classDef data fill:#E2E8F0,stroke:#475569,stroke-width:2px,color:#1E293B
    classDef portal fill:#FCE7F3,stroke:#DB2777,stroke-width:2px,color:#831843
    style PC fill:#F0F9FF,stroke:#0284C7,stroke-width:2px,color:#0C4A6E

Requirements

  • Windows 10/11 or Windows Server 2016+, 64-bit, or Linux 64-bit (Ubuntu 22.04+, Debian 12+ or similar).
  • Access to https://api.qmonitor.app (HTTPS, port 443).
  • A QMonitor user, who approves the hub with their own account.

One hub, all your organizations

A hub belongs to the QMonitor user who approves it, not to an organization. It reads the organizations that user belongs to, checked at every request: when you join a new organization the hub sees it at once, when you leave one it stops seeing it. Issues and instance status come from all your organizations, each row with its organization; metrics, instances and a single issue belong to one organization: tools ask for organization when you have more than one (list_organizations lists them).

Install and enroll

  1. Download the installer from QMonitor: Settings → Manage my Hub, then install the hub:

    • Windows: run QMonitorHub-<version>.exe as the user that will use the hub. It includes .NET 10 and installs it only if missing (Windows asks for administrator rights once, for .NET only); the hub itself is installed for your user, in %LOCALAPPDATA%\Programs\QMonitor Hub, and added to that user’s PATH, so QMonitorHub works from any command prompt opened after the installation.

    • Linux (Debian/Ubuntu):

      sudo apt install ./qmonitorhub_<version>_amd64.deb
      

      On RHEL, Rocky, Alma or Fedora use the .rpm:

      sudo dnf install ./qmonitorhub_<version>_x86_64.rpm
      

      The command is qmonitorhub.

  2. Open a command prompt or terminal as the user that will use the hub and run:

    QMonitorHub enroll
    
  3. Your browser opens the Enroll QMonitor Hub page (log in if asked). On a Linux server without a browser, open the address the hub prints on another computer. Check the user, computer and organizations shown and click Approve Hub.

  4. Back in the command prompt the hub confirms it is enrolled. Done: you never need to approve it again.

Check it at any time with:

QMonitorHub status

Each user on each computer is a separate hub, with its own key.

Commands

CommandWhat it does
QMonitorHub enrollConnects the hub to your QMonitor account (once)
QMonitorHub statusEnrollment, organizations, key expiry, connection to QMonitor, new issues waiting for review, version, folders
QMonitorHub mcp --stdioMCP server for AI assistants: the assistant starts it (below)
QMonitorHub serve --httpLocal HTTP API for Excel, PowerShell and applications (below)
QMonitorHub logsLast lines of the log (--tail 200 for more, --open to open the folder) (below)
QMonitorHub updateInstalls the latest version (below)
QMonitorHub versionInstalled version
QMonitorHub helpAll commands, options and examples

Use it from an AI assistant (MCP)

The assistant starts the hub by itself. Register it once (on Linux use /usr/bin/qmonitorhub as the command):

Claude Code

claude mcp add qmonitor -- "%LOCALAPPDATA%\Programs\QMonitor Hub\QMonitorHub.exe" mcp --stdio

Claude Desktop (claude_desktop_config.json) and other MCP clients:

{
  "mcpServers": {
    "qmonitor": {
      "command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\QMonitor Hub\\QMonitorHub.exe",
      "args": ["mcp", "--stdio"]
    }
  }
}

P.S. You might need to launch claude mcp add --scope user qmonitor -- QMonitorHub mcp --stdio to effectively register it

GitHub Copilot CLI (~/.copilot/mcp-config.json):

{
  "mcpServers": {
    "qmonitor": {
      "type": "stdio",
      "command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\QMonitor Hub\\QMonitorHub.exe",
      "args": ["mcp", "--stdio"],
      "tools": ["*"]
    }
  }
}

P.S. For GitHub Copilot, we recommend launching the /mcp add command and following the guided procedure.

Then just ask, for example: “Which QMonitor issues are open on SRV01?”, “Show the CPU of SRV01 in the last 24 hours” or “Is the CPU of SRV01 today higher than yesterday?”. The hub also gives the assistant a short method for investigating SQL Server problems, and marks which tools change something.

ToolWhat it does
list_organizationsOrganizations the hub reads; the other tools take organization when there is more than one
list_metricsAll the data behind the QMonitor dashboards: performance metrics, SQL Server events (errors, blocking, deadlocks, timeouts), running queries and query statistics, Agent jobs, backups, Always On, Azure, long-term history; with fields, tags and the unit of the fields where it is known
list_instancesMonitored SQL Server instances
get_metricData of a metric: time series (up to 30 days, 400 for the long-term history) or, for events, queries and jobs, the latest rows, filtered on any field (equal, different, contains, greater/less than), page by page or counted per interval. Together with the data it says which interval and aggregation were used and whether more rows are available
compare_metricA metric in a period compared with another period of the same length (by default the one just before): current value, baseline, change and change in %
list_instance_statusMonitored instances with their status (Online, Offline…), edition and version
list_issue_statsOpen issues by rule and severity, and the daily trend
list_open_issuesOpen issues of all your organizations, newest first, each with its organization
get_issueDetails of an issue and of the rule that raised it
get_issue_contextHistory of the same issue in the last 30 days and the rule documentation
list_active_alertsMonitoring rules currently enabled, with thresholds
list_new_issuesIssues opened since the last check, waiting for review (below)
acknowledge_issuesRemoves reviewed issues from that list (it does not close them in QMonitor)
list_databasesDatabase inventory (portal Inventory page)
close_issue, reopen_issueCloses an issue with a note, or reopens it
exclude_issueExcludes the rule of an issue for an instance, database, object, tag or server group, optionally closing the matching issues
list_exclusions, remove_exclusionLists the exclusions and removes one

Change issues from the assistant

close_issue, reopen_issue, exclude_issue and remove_exclusion are disabled by default. An organization owner enables them per user in Settings → Organization → Members, column Hub can edit issues. Demo users cannot use them. The changes are recorded with that user.

Use it from Excel, PowerShell or your applications (HTTP)

Start the local API and leave the window open:

QMonitorHub serve --http

It answers only on this computer, at http://localhost:5310 (change the port with --Hub:HttpPort=5320).

AddressReturns
/statusHub name, your user, the organizations it reads and key expiry
/metrics/catalogMetrics you can read, with fields and tags
/metrics/instancesMonitored SQL Server instances
/metrics/<measurement>Data of a metric: same parameters as Custom Dashboards (timeFrom, timeTo, fields, tags, aggregation, interval, filter.<tag>), plus limit for events, queries and jobs (latest rows, max 500)
/metrics/<measurement>/tags/<tag>Values of a tag

With more than one organization the /metrics/... addresses need organization=<name> (names in /status), for example /metrics/instances?organization=acme. | /issues/by-predicate, /issues/by-tag | Open issues by rule or by tag (optional instance) | | /issues/daily-trend | Issues opened/closed per day (optional from, to, instance) | | /instances/status | Monitored instances with their status, edition and version | | /issues/new | Issues opened since the last check, waiting for review |

All of them return JSON.

PowerShell

Invoke-RestMethod "http://localhost:5310/metrics/sqlserver_cpu?timeFrom=2026-10-20T00:00:00Z&timeTo=2026-10-21T00:00:00Z&fields=sqlserver_process_cpu&tags=sql_instance"

Excel (Power Query): Data → Get Data → From Other Sources → Blank Query, then Advanced Editor:

let
    Source = Json.Document(Web.Contents("http://localhost:5310/metrics/sqlserver_cpu?timeFrom=2026-10-20T00:00:00Z&timeTo=2026-10-21T00:00:00Z&fields=sqlserver_process_cpu&tags=sql_instance")),
    Table = Table.FromRecords(Source)
in
    Table

Choose Anonymous when Excel asks how to connect: the hub handles access to QMonitor.

Your own application (any language with an HTTP client). Plain GET requests to http://localhost:5310, no credentials: don’t send an Origin header (requests that look like they come from a web page are refused). Example in Python, standard library only:

import json
import urllib.parse
import urllib.request

HUB = "http://localhost:5310"

def get(path, **params):
    url = HUB + path + ("?" + urllib.parse.urlencode(params) if params else "")
    with urllib.request.urlopen(url, timeout=60) as response:
        return json.load(response)

print(get("/status"))
for issue in get("/issues/by-predicate"):
    print(issue)
cpu = get("/metrics/sqlserver_cpu", timeFrom="2026-10-20T00:00:00Z", timeTo="2026-10-21T00:00:00Z",
          fields="sqlserver_process_cpu", tags="sql_instance")
print(len(cpu), "rows")

Errors come back with an HTTP status, and a JSON {"error": "..."} body when there is a message: 400 invalid parameters, 403 request refused (not local or from a web page), 429 too many requests (more than 120 per minute), 503 hub not enrolled.

New issues and AI-assisted fixes

While mcp --stdio or serve --http runs, the hub checks your open QMonitor issues every 10 minutes and keeps the list of the new ones (opened after it started watching) on your computer. Your AI assistant reads them with list_new_issues, investigates each one with the other tools (issue details and history, metrics, events, queries, jobs) and, when the cause is clear, proposes a fix to you: T-SQL or steps, risks, how to verify it. Nothing is executed by the hub or by QMonitor: you decide whether to apply it. Reviewed issues are removed from the list with acknowledge_issues.

For example, ask: “Check the new QMonitor issues and tell me which ones you can fix and how.”. Whether the assistant does it only when you ask or on a schedule depends on the assistant you use.

The interval can be changed in your settings file (%LOCALAPPDATA%\QMonitorHub\appsettings.json on Windows, ~/.local/share/QMonitorHub/appsettings.json on Linux; create it if it doesn’t exist, updates never change it):

{
  "Hub": {
    "IssuePollMinutes": 10
  }
}

QMonitorHub status shows how many new issues are waiting.

Updates

The hub updates itself every hour: on Windows with a scheduled task of your user created by the installer, on Linux with a system timer installed by the package. It downloads the new version, verifies it and installs it silently. AI assistants and windows already using the hub keep the previous version until they are restarted. To update right away:

QMonitorHub update

(on Linux it asks for your sudo password). QMonitorHub version shows the installed version.

Security

  • The key is stored for your user only: in the Windows Credential Manager on Windows, in an encrypted file readable only by your user (~/.config/qmonitorhub) on Linux. It never appears in settings files, command lines or logs, and the hub never gives it to the tools that call it.
  • The key is renewed automatically every week. If the hub stays off for more than about two weeks, run QMonitorHub enroll again.
  • The local HTTP address accepts connections only from this computer and refuses requests coming from web pages.
  • The local HTTP address has no password: any program running on this computer can read QMonitor data through it while serve is running. Run it only on computers you trust and stop it when you don’t need it.
  • QMonitor records the requests as coming from the hub (user@computer), not from a specific application.
  • Through the hub, the tools you connect see the same data as your QMonitor dashboards, including the text of the queries, logins and error messages captured on your SQL Servers. An AI assistant sends what it reads to its provider.
  • The local address does not ask for Windows authentication. Even if it did, Windows authentication identifies the Windows account, not the program that is calling: it would not protect against other programs running as the same user.

Manage and revoke hubs

In QMonitor open Settings → Manage my Hub to see your hubs, the organizations they read and when they were last used. Revoke blocks a hub immediately; to use it again, enroll it again.

Troubleshooting

The hub writes a log of every request it receives and every call it makes to QMonitor (never the key). The logs are not in the program folder, which is replaced by updates, but in the hub’s data folder:

WindowsLinux
Program and default settings (replaced by updates)%LOCALAPPDATA%\Programs\QMonitor Hub/opt/qmonitorhub
Your settings appsettings.json (kept)%LOCALAPPDATA%\QMonitorHub~/.local/share/QMonitorHub
Logs (one file per day, kept 14 days)%LOCALAPPDATA%\QMonitorHub\logs~/.local/share/QMonitorHub/logs

To read them:

QMonitorHub logs              # last 50 lines of the latest log
QMonitorHub logs --tail 200   # last 200 lines
QMonitorHub logs --open       # opens the log folder

QMonitorHub status also shows the folder. While serve --http runs, the same lines appear in its window. For more detail set "LogLevel": "Debug" in the Hub section of your settings file.

MessageWhat to do
The hub is not enrolled: run QMonitorHub enroll.Enroll the hub (first use, or the key was removed from Windows).
The hub key was revoked or expired more than a week agoThe hub was revoked or stayed off too long: run QMonitorHub enroll.
QMonitor is not reachableCheck the connection to https://api.qmonitor.app (proxy, firewall).
HTTP 403 from localhost:5310Call it from a program on the same computer, not from a web page.
HTTP 400 with an error messageA parameter is not valid: see the message and the Custom Dashboards parameters.