DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Grafana Query — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-grafana-query

Grafana Query

用于 DeepSeek Harness 的只读 Grafana 指标和告警工具。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-grafana-query@0.1.0
README兼容性版本

兼容性与来源证明

Grafana Query 以 dsh-grafana-query 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/8/27

版本

0.1.0stable
2026/8/26

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 2
周下载
0
最近提交
2026/8/27
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 ui-customization 分类下经过校验的插件。

Remote Web Ui@linxin666/dsh-remote-web-ui通过扫码配对访问 dsh Web GUI,共享一个官方界面:设置按钮旁的二维码可将手机和 PC 配对到同一个 Web GUI(手机采用竖屏触控适配层,PC 使用完整桌面界面),通过一次性令牌和 rClient Ui Task Board@linxin666/dsh-client-ui-task-board面向 DSH Web GUI 的主机权威任务面板,支持实际会话执行、主机 cron 调度以及可选的跨平台空闲睡眠保护;以挂载方式提供,无需修改 DSH 源代码。Client Ui Git Graph@linxin666/dsh-client-ui-git-graph外部 dsh Web GUI 插件:空会话 Git 分支选择器和 Git 图,包含实际的主机端 Git 操作与防护,作为 dsh 配置文件包Pet@linxin666/dsh-pet适用于 dsh Web GUI 的多宠物伴侣插件:由注册表驱动的浮动宠物,可响应模型活动,支持为每只宠物命名、抚摸/喂食互动以及亲密度评分

README

dsh-grafana-query

English | 繁體中文 | 简体中文 | 日本語

dsh-grafana-query is a free, open-source, read-only DeepSeek Harness plugin for Grafana. It lets an agent run PromQL through Grafana's data source proxy and read the state of Grafana unified alerting, without changing anything in Grafana.

Not to be confused with dsh-grafana on npm, which is a dashboard editor that writes dashboard JSON back to Grafana. This plugin does the opposite job: read-only metric queries and alert state. Dashboard and panel JSON are explicitly out of scope.

Tools

ToolPurpose
grafana_healthCheck that the instance is reachable and report its version.
grafana_list_datasourcesList data sources with uid, type, and access mode. Run this first.
grafana_queryRun an instant PromQL query through the data source proxy.
grafana_query_rangeRun a range PromQL query with an enforced step and point budget.
grafana_alert_stateRead the current state of unified alerting rules.
grafana_list_alert_rulesList provisioned alert rule definitions.

All tools are read-only. Version 0.1 never creates, edits, deletes, silences, acknowledges, or pauses anything in Grafana.

Limits

Every limit below is enforced by the plugin, not by Grafana. Whenever something is trimmed, meta.truncated and the pre-truncation totals say so.

LimitValue
Points per series (max_points)200 by default, 500 maximum. Prometheus returns both endpoints, so a range of n seconds at step s yields floor(n / s) + 1 points
Range length (grafana_query_range)31 days
Total points in one range response20000; series past that are dropped whole, never cut in half
Series per querymaxSeries, 100 by default
Alert rules per tool (grafana_alert_state, grafana_list_alert_rules)500 matching rules; the rest cannot be reached by paging, so use the filters
Alert instances per rule10 by default, 50 maximum
Page size20 by default, 100 maximum
Upstream error text200 characters, HTTP 400 only

grafana_alert_state returns firing, pending, and unknown rules by default — inactive rules are excluded unless you ask for them with state.

Requirements

  • DeepSeek Harness with compatible @deepseek-ai/dsh-tools APIs
  • Node.js 22.19 or newer in the 22.x line, or Node.js 24 or newer
  • Grafana 9.0 or newer — only the uid data source proxy (/api/datasources/proxy/uid/:uid/*) is supported; the deprecated numeric-id path is not

Configuration

export GRAFANA_URL='https://grafana.example.com'
export GRAFANA_TOKEN='glsa_your_service_account_token'
FieldEnvironment variableDefaultRange
baseUrlGRAFANA_URLrequiredHTTP(S) URL, no credentials, no query or fragment; a sub-path is fine
tokenGRAFANA_TOKENrequirednon-empty
locale—enen, zh-TW, zh-CN, ja
requestTimeoutMs—300001 – 300000
maxResponseBytes—52428801 – 52428800
maxSeries—1001 – 1000

Plugin configuration takes precedence over the environment variables.

Permissions

A Grafana service account token (recommended) or a legacy API key both work — they use the same Authorization: Bearer header. A Grafana Cloud Access Policy token (glc_) is for the Cloud data endpoints and does not work with this API.

How to set this up in Grafana

The scope names in the table below are what Grafana checks internally — they are not what you tick in the UI. When you create the service account, the combination that works is:

  1. Basic role Viewer — covers datasources:read and datasources:query.
  2. Add the fixed role Alerting → Full read-only access — covers alert.rules:read and alert.provisioning:read.

Verified on Grafana Cloud on 2026-08-27 with exactly that combination: all six tools worked. See the verification note.

A least-privilege token stays usable. Grafana filters GET /api/datasources by what the token may reach rather than returning 403, so under a token granted Query on a single data source, grafana_list_datasources returns just that one — measured 2026-08-27: 26 entries for a Viewer token, 1 for the restricted one. You never get a list full of data sources that would fail when queried. (A per-data-source Query grant also implies metadata read on that data source, so there is no "can query but cannot read" state to worry about.)

Scope reference

ToolRequired permission
grafana_healthnone — /api/health needs no authentication, so this tool cannot tell you whether the token is valid. Use grafana_list_datasources for that.
grafana_list_datasourcesdatasources:read
grafana_query, grafana_query_rangedatasources:query (plus datasources:read for pre-flight type checks)
grafana_alert_statealert.rules:read
grafana_list_alert_rulesalert.provisioning:read

Grafana Cloud

Point baseUrl at the stack itself and use a service account token created in that stack:

export GRAFANA_URL='https://your-stack.grafana.net'
export GRAFANA_TOKEN='glsa_your_service_account_token'

Do not use a glc_ Access Policy token here. Cloud stacks ship many built-in data sources, so use the type and name_contains filters of grafana_list_datasources to keep the list short.

Install

bun add dsh-grafana-query

The package ships cordis.patch.yml, declared through dsh.bundle.patch in package.json, so the DeepSeek Harness registry can load the plugin with its default configuration.

Examples

  1. grafana_list_datasources with {"type": "prometheus"} to find the uid.
  2. grafana_query with {"datasource_uid": "prom-1", "query": "up"} for the current value.
  3. grafana_query_range with {"datasource_uid": "prom-1", "query": "rate(node_cpu_seconds_total[5m])", "start": "...", "end": "..."} for the trend. Omit step and the plugin picks one so each series stays within max_points.
  4. grafana_alert_state with no arguments to see what is firing right now.

Internationalization

Set locale to en, zh-TW, zh-CN, or ja to change the tool and parameter descriptions the model sees. Tool names always stay in English, and error messages are always in English.

Security and error behavior

  • Every tool is read-only.
  • Errors never contain the token, the Authorization header, or a raw response body.
  • The single exception: when Prometheus rejects a query with HTTP 400, the structured error field is passed through so the agent can fix its PromQL. It is capped at 200 characters and runs through a redaction pass first. Every other status code returns a static message.
  • Responses are bounded by maxResponseBytes, maxSeries, and a per-series point budget. Whenever anything is trimmed, meta.truncated and the pre-truncation totals say so.

Development

bun install
bun run lint
bun run typecheck
bun run test
bun run build

License

MIT