You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Grafana自定义面板插件部署后出现404错误求助

解决Grafana面板插件404 (Not Found)错误的方案
  • 修正插件存放目录
    Grafana的public/app/plugins/panel是官方内置面板的存放路径,第三方插件需放在C:\Program Files\GrafanaLabs\grafana\data\plugins目录下。把dist文件夹内容移动到这个目录,保持文件夹名为cni-names-panel,然后重启Grafana。

  • 校验plugin.json关键配置
    打开plugin.json,确保以下字段正确:

    • id:必须和插件文件夹名称完全一致(例如cni-names-panel)
    • type:设置为panel
    • main:指向dist目录下的入口文件(通常是./module.js,需和build产物匹配)
      示例正确配置片段:
    {
      "id": "cni-names-panel",
      "type": "panel",
      "main": "./module.js",
      "name": "CNI Names Panel",
      "info": {
        "description": "Hello World panel plugin",
        "author": { "name": "Your Name" },
        "version": "1.0.0"
      }
    }
    
  • 确认build产物完整性
    检查dist文件夹是否包含module.js(或plugin.js)、plugin.json及其他必要静态资源。如果build过程有报错,重新执行npm run build确保产物完整。

  • 检查Grafana配置文件
    打开C:\Program Files\GrafanaLabs\grafana\conf\defaults.ini(或自定义配置文件),确认插件相关配置:

    [plugins]
    plugins_dir = data/plugins
    enable_alpha = true
    
  • 清除缓存并重启服务
    按Ctrl+Shift+R强制刷新浏览器清除缓存,同时完全重启Grafana服务(结束进程后重新启动)。

内容的提问来源于stack exchange,提问作者anas ben raies

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 05:32:13