国际新闻 · 中文译文与原文对照

星期六 最新 1,000 篇 · 滚动浏览

科技

Grafana 13.3新增共享仪表板变量与笔记本功能

来源:InfoQ 技术发布 上传时间 (多伦多时间)1 家来源 · 1 篇报道

中文译文

Grafana Labs发布了Grafana 13.3版本,该版本引入了跨仪表板变量功能,使团队能够在一个地方管理共享的仪表板控制设置。此次更新还推出了Notebooks功能,可用于将面板信息和调查笔记收集在文档中,供同事共享。

发布公告称,跨仪表板变量功能已在所有Grafana版本中作为公共预览版本推出。团队只需定义一次变量,即可在多个仪表板中使用它,从而无需为环境或区域等选择器单独配置。Grafana指出,单独管理这些配置可能会导致配置不一致的问题。

跨仪表板变量功能满足了用户长期以来的需求。在2021年的一次GitHub讨论中,Grafana用户Darth-Bobo提到需要在各个仪表板中分别维护相同的变量,并警告称配置差异可能会“随着时间推移变得难以管理”。最近,一位早期测试者表示,共享变量功能对于在不使用Terraform模板的情况下评估Git同步情况非常有用。变量可以具有全局作用域,这样它们在整个Grafana组织中都可用;也可以具有文件夹作用域,这样它们仅限于同一文件夹中的仪表板使用。编辑者可以从仪表板侧边栏单独或一次性添加可用的变量。即使变量配置由中央统一管理,查看者仍然可以更改仪表板上选定的值。

需要自行运行Grafana的团队必须启用grafana.dashboardGlobalVariables功能开关才能试用此功能。Grafana将管理界面置于“仪表板 > 变量”下方,与用户添加共享控件的仪表板编辑器分开。

所有版本的笔记本也处于公开预览阶段。笔记本可以包含来自仪表板或Explore的面板,以及文字记录,还可以包含Grafana Assistant的分析结果。团队可以利用该文档记录问题调查过程,或为事后分析准备已包含相关面板的文档。用户可以手动创建笔记本,也可以通过Grafana Assistant创建,之后再将其保存并共享。Grafana正在逐步将此功能推送到Grafana Cloud平台。对于自行管理的安装环境,需要启用dashboard.notebooks功能开关。

Grafana的笔记本功能与其他可观测性厂商类似的调查文档工作流相类似。Datadog Notebooks将实时图表与富文本结合在一起,支持同时编辑、内联评论以及可重复使用的事后分析模板。New Relic Notebooks自2026年8月起正式推出,它将NRQL查询、可视化图表和Markdown格式结合在一起,同时还具备自然语言查询转换功能以及适用于整个笔记本的变量功能。此次更新还改变了Grafana Assistant构建仪表板的方式。在公开预览版中,仪表板规划功能允许用户描述他们想要监控的内容,并在构建之前通过聊天界面查看拟定的布局。该规划包括标题以及拟使用的面板,涵盖可视化类型和变量等信息。通过只读预览,用户可以在选择构建并保存仪表板之前进一步完善规划。

另一个独立的Assistant功能“撤销操作”已在所有版本中正式推出。该功能可在Assistant进行编辑后恢复仪表板的先前状态,即便某次操作更改了多个面板也是如此。Assistant的仪表板使用指南指出,如果仪表板在Assistant编辑之后发生了变化,则无法使用撤销功能。Grafana 13.3还带来了视觉更新,包括经过改进的主题和界面组件。Grafana Labs表示,此次视觉更新保留了现有的导航结构和工作流程,且不会对插件造成任何破坏性变更。使用标准Grafana组件和主题样式的插件会自动采用新外观;而那些具有自定义样式的插件则可以单独进行迁移。自行管理的用户可以启用grafana.visualDesignRefresh来试用新设计,之后也可恢复到之前的设计。

原文

Grafana Labs has released Grafana 13.3 with cross-dashboard variables that let teams manage shared dashboard controls in one place. The release also introduces Notebooks for collecting panels and investigation notes in a document that colleagues can share.

The release announcement describes cross-dashboard variables as a public preview across all Grafana editions. Teams can define a variable once and use it in multiple dashboards, avoiding separate configurations for a selector such as an environment or a region. Grafana says managing those copies separately can lead to configuration drift.

Cross-dashboard variables address a longstanding user request. In a 2021 GitHub discussion, Grafana user Darth-Bobo described having to maintain the same variables separately across dashboards, warning that configuration differences could become "unmanageable over time". More recently, an early tester described shared variables as useful for evaluating Git Sync without Terraform templating.

Variables can have global scope, which makes them available throughout a Grafana organisation, or folder scope, which limits them to dashboards in the same folder. An editor can add the available variables from a dashboard sidebar, either individually or all at once. Viewers can still change the selected value on a dashboard, while the variable configuration remains centrally managed.

Teams running Grafana themselves must enable the grafana.dashboardGlobalVariables feature toggle to try the preview. Grafana places the management screen under Dashboards > Variables, separate from the dashboard editor where users add the shared controls.

Notebooks are also in public preview across all editions. A notebook can hold panels from dashboards or Explore alongside written observations, with findings from Grafana Assistant included as well. Teams can use the document to record how they investigated an issue or to prepare a post-incident review with relevant panels already in place.

Users can create a notebook manually or through Grafana Assistant, then save and share it. Grafana is rolling the feature out gradually to Grafana Cloud. Self-managed installations need the dashboard.notebooks feature toggle enabled.

Grafana’s Notebooks joins similar investigation-document workflows from other observability vendors. Datadog Notebooks combines live graphs with rich text and supports simultaneous editing, inline comments and reusable postmortem templates. New Relic Notebooks, generally available since August 2026, combines NRQL queries, visualisations and Markdown, with natural-language query translation and notebook-wide variables.

The release also changes how Grafana Assistant builds dashboards. In public preview, dashboard plans let a user describe what they want to monitor and review a proposed layout in chat before building it. The plan covers the title and the proposed panels, including visualisation types and variables. A read-only preview lets the user refine the plan before choosing to build and save the dashboard.

A separate Assistant feature, Undo turn, is generally available across all editions. It restores the previous dashboard state after an Assistant edit, including when one request changed multiple panels. The Assistant dashboarding guide notes that undo is unavailable if the dashboard has changed since the Assistant's edit.

Grafana 13.3 also previews a visual refresh with revised themes and interface components. Grafana Labs says the visual refresh preserves existing navigation and workflows and introduces no breaking changes for plugins. Plugins using standard Grafana components and theme tokens pick up the new appearance; those with custom styling can migrate separately. Self-managed users can enable grafana.visualDesignRefresh to try it and switch back to the previous design.