grafana报错This panel requires Angular (deprecated)

1.原因

报错解释:

Grafana在更新到7.0版本后,弃用了AngularJS(一种用于构建大型Web应用的JavaScript框架)。在早期的Grafana版本中,某些面板可能依赖于AngularJS,但这种依赖已经逐步被新的React或Vue面板所取代。当你看到这个错误时,意味着当前的Grafana面板需要一个已经不再支持的AngularJS环境。

解决方法:

  1. 更新面板:检查面板是否有更新版本,以支持新的Grafana版本。如果有,请更新面板到最新版本。

  2. 替换面板:如果当前面板不再维护,寻找一个替代的面板,它是用更现代的前端框架构建的,如React或Vue。

  3. 降级Grafana:如果你必须使用旧的面板,可以考虑将Grafana版本回退到该面板支持的版本。

官网解释

Angular support deprecation

Angular plugin support is deprecated and will be removed in a future release. There are legacy core Grafana visualizations and external plugins that rely on Grafana's Angular plugin support to work. The same is likely true for private plugins that have been developed by Grafana users for use on their own instances over the years. From Grafana v9 and onwards, there is a server configuration option that's global to the entire instance and controls whether Angular plugin support is available or not. In Grafana 11, we will change the default value for the configuration to remove support.

Warning messages are displayed if a dashboard depends on an a panel visualization or data source which requires AngularJS as shown in the following video:
To avoid disruption:

  • Ensure that you are running the latest version of plugins by following this guide on updating. Many panels and data sources have migrated from AngularJS.
  • If you are using legacy Core Grafana visualizations such as Graph or Table-old, migrate to their replacements using the provided automatic migrations.
  • Review the list of current Angular plugins to discover which Core and external plugins are impacted, and whether an update or alternative is required.

2.解决办法

Plugins using AngularJS | Grafana documentation

插件自动迁移:

Automatic migration of plugins

Certain legacy Grafana panel plugins automatically update to their React-based replacements when Angular support is disabled. This migration is usually available within the panel options, as shown in the screenshot below for World Map. Automatic migration can be triggered by setting the feature toggle autoMigrateOldPanels to true.

Automatic migration is supported for the plugins shown in the following table. Each of the target plugins are included in Grafana as Core plugins which don't require installation.
A dashboard must still be saved with the new plugin ID to persist the change.

3.修改grafana配置文件

查看插件的安装路径:

复制代码
ps aux|grep grafana

查看目录:

复制代码
/usr/local/var/lib/grafana/plugins

配置文件 config目录

复制代码
/usr/local/etc/grafana/grafana.ini

添加一行代码

复制代码
autoMigrateOldPanels = true

保存后,重启grafana

复制代码
brew services restart grafana
相关推荐
chen_mangoo3 分钟前
Rockchip debian预置安装deb包
linux·驱动开发·嵌入式硬件
雪风飞舞5 分钟前
conda 常用命令
linux·windows·conda
用户74712201169836 分钟前
linux最小版本编译-草稿(有空再来修改下)
linux
不想上班的小吕7 分钟前
采购申请创建(BAPI_PR_CREATE/BAPI_REQUISITION_CREATE)
java·服务器·数据库
Xの哲學11 分钟前
Linux Select 工作原理深度剖析: 从设计思想到实现细节
linux·服务器·网络·算法·边缘计算
VekiSon12 分钟前
综合项目实战——电子商城信息查询系统
linux·c语言·网络·http·html·tcp·sqlite3
牛奶咖啡1312 分钟前
shell脚本编程(二)
linux·正则表达式·shell编程·正则表达式扩展·shell通配符·shell的变量·shell的引用
xiaoliuliu1234513 分钟前
xampp-linux-1.8.1.tar.gz 怎么安装?Linux下XAMPP离线安装完整步骤
linux·运维·服务器
用户61354114601619 分钟前
xampp-linux-1.8.1.tar.gz 怎么安装?Linux下XAMPP离线安装完整步骤
linux
落羽凉笙24 分钟前
Python基础(4)| 详解程序选择结构:单分支、双分支与多分支逻辑(附代码)
android·服务器·python