CnOps 智能运维与可观测社区
首页开源项目实践文章视频课程常见问答开发者工具STAROps 专题
导航菜单
首页开源项目实践文章视频课程常见问答开发者工具STAROps 专题

CnOps 智能运维与可观测社区

愿景

CnOps 智能运维与可观测社区是一个以"智能运维与可观测"为核心的开放、包容、分享的技术社区,旨在聚集运维专家、开发者和爱好者,共同探讨、学习和分享可观测最佳实践与最新技术,与众多技术社区合作互动,共同探讨交叉领域的技术挑战,推动可观测领域的创新与进步。

内容社区

  • 实践文章
  • 视频课程
  • 开源项目
  • 常见问答
  • 开发者工具

友情链接

  • Prometheus
  • Grafana Lab
  • OpenTelemetry
  • LoongCollector

关注我们

阿里云云原生公众号阿里云云原生
阿里云可观测公众号阿里云可观测

Copyright © 2026 CnOps 社区. All rights reserved.

首页/开源项目/UModel/查询入口
文档目录
UModel 中文文档
对象图语义层Workspace 与 DomainModel ElementsEntitySetDataSetLink 与字段映射Storage 与 GraphStoreEntity 与 Relation查询入口
GraphStore Providers文档国际化规则Web UI 架构Web UI API 对照UModel SDK 规范

UModel

查询入口

Query Service 是 UModel 的公共读取面。REST、CLI、Web UI、SDK 和 MCP tools 都收敛到同一套查询概念。 | Source | 读取内容 | 示例 | |---|---|---| | .umodel | 模型定义 | .umodel with(kind='entityset') | | .entity | 运行时实体 | .entity...

Query Service 是 UModel 的公共读取面。REST、CLI、Web UI、SDK 和 MCP tools 都收敛到同一套查询概念。

Sources

Source 读取内容 示例
.umodel 模型定义 .umodel with(kind='entity_set')
.entity 运行时实体 .entity with(domain='devops', name='devops.service')
.topo 运行时拓扑关系 `.topo

查询流程

flowchart LR
  Client["REST / CLI / Web / SDK / MCP"]
  Query["Query Service"]
  Planner["Parser + planner"]
  Provider["GraphStore provider"]
  Result["Rows + explain"]

  Client --> Query
  Query --> Planner
  Planner --> Provider
  Provider --> Result
  Result --> Client

Execute 与 Explain

执行查询:

go run ./cmd/umctl --addr http://localhost:8080 query run demo ".umodel | limit 5"

Explain 查询计划:

go run ./cmd/umctl --addr http://localhost:8080 query explain demo ".entity with(domain='devops', name='devops.service') | limit 5"

Explain 输出 source、provider、planned operators 和 limit 行为。

边界

领域读取不应绕过 Query Service:

  • 不新增独立 entity lookup 公共 endpoint。
  • 不新增独立 relation lookup 公共 endpoint。
  • 不新增独立 graph traversal 公共 endpoint。
  • CLI 读取统一使用 query run 和 query explain。

Agent 用法

AgentGateway 通过工具暴露 Query Service:

  • query_spl_execute
  • query_spl_explain
  • query_spl_examples

Resources 默认只承载元数据,运行时 rows 应由 tools 返回。

相关参考

  • Query Service 指南
  • MCP 参考

文章大纲