---
title: QMonitor Hub
description: Use QMonitor data from AI assistants, Excel, PowerShell and your own tools, without handling credentials.

url: https://help.qmonitor.app/docs/tasks/qmonitor-hub/index.md
lastmod: 2026-10-22T14:41:55+02:00
---


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 your organization's monitoring data 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.

```mermaid
%%{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 · read only" ==> 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
```

{{% alert title="Read only" color="info" %}}
The hub can only **read** data of the organization it was approved for. It cannot change settings, close issues or
run queries of its own.
{{% /alert %}}

## 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 **Premium** user in QMonitor to approve the hub.

## Install and enroll

1. Download the installer from QMonitor: **Settings → Manage organization → QMonitor Hubs** (Premium users), then
   install the hub:
   - **Windows**: run `QMonitorHub-<version>.msi` as the user that will use the hub (no administrator rights needed).
     It installs in `%LOCALAPPDATA%\Programs\QMonitor Hub` and adds it 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
     ```

     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 and computer shown, choose the organization 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.

## 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:

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

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

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

Then just ask, for example: *"Which QMonitor issues are open on SRV01?"* or *"Show the CPU of SRV01 in the last 24 hours"*.

| Tool | What it does |
|---|---|
| `list_metrics` | Metrics you can read, with fields and tags |
| `list_instances` | Monitored SQL Server instances |
| `get_metric` | Time series of a metric (up to 30 days) |
| `list_open_issues` | Open issues, newest first |
| `get_issue` | Details of an issue and of the rule that raised it |
| `get_issue_context` | History of the same issue in the last 30 days and the rule documentation |
| `list_active_alerts` | Monitoring rules currently enabled, with thresholds |

## 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`).

| Address | Returns |
|---|---|
| `/status` | Organization, hub name and key expiry |
| `/metrics/catalog` | Metrics you can read, with fields and tags |
| `/metrics/instances` | Monitored SQL Server instances |
| `/metrics/<measurement>` | Data of a metric: same parameters as [Custom Dashboards](../dashboards/metrics/) (`timeFrom`, `timeTo`, `fields`, `tags`, `aggregation`, `interval`, `filter.<tag>`) |
| `/metrics/<measurement>/tags/<tag>` | Values of a tag |
| `/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`) |

All of them return JSON.

**PowerShell**

```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.

## Updates

The hub checks once a day whether a new version is available and tells you in `QMonitorHub status` and in the
`serve --http` window. To install it:

```
QMonitorHub update
```

It downloads the new version, verifies it and installs it (on Linux it asks for your `sudo` password). Close the AI
assistants that use the hub first, so the program can be replaced. `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 month. If the hub stays off for more than about five 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.

## Manage and revoke hubs

In QMonitor open **Settings → Manage organization → QMonitor Hubs** to see every hub of the organization, who approved
it and when it was 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):
`%LOCALAPPDATA%\QMonitorHub\logs` on Windows, `~/.local/share/QMonitorHub/logs` on Linux; `QMonitorHub status`
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 `appsettings.json`.

| Message | What 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 ago` | The hub was revoked or stayed off too long: run `QMonitorHub enroll`. |
| `QMonitor is not reachable` | Check the connection to `https://api.qmonitor.app` (proxy, firewall). |
| HTTP 403 from `localhost:5310` | Call it from a program on the same computer, not from a web page. |
| HTTP 400 with an error message | A parameter is not valid: see the message and the [Custom Dashboards](../dashboards/metrics/) parameters. |

