一、点击之后报错pdf报错:NO image renderer available/installed
查看grafana日志后,有以下报错:
Could not render image, no image renderer found/installed. For image rendering support please install the grafana-image-renderer plugin. Read more at https://grafana.com/docs/grafana/latest/administration/image_rendering/
所以,从官方插件库下载离线包grafana-image-renderer-3.5.0.linux-amd64,3.5.0以上版本需要8.0的grafana,所以我们选择最后一个版本。
解压到GRAFANA_HOME/data/plugins/插件文件夹中,比如我的文件路径为“/usr/local/grafana/data/plugins/”。
重启grafana-server。
二、再次点击生成pdf报错,查看后发现grafana日志
ror msg="Render request failed" logger=plugins.backend pluginId=grafana-image-renderer url="http://localhost:3000/d-solo/Bh5Q8Hpnz/_?from=now-24h&height=600&panelId=4&theme=light&to=now&var-hostname=192.168.113.100&width=1800&render=1" error="Error: Failed to launch the browser process!\n/usr/local/grafana/data/plugins/plugin-linux-x64-glibc/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n"
t=2023-05-05T10:55:35+0800 lvl=eror msg="Rendering failed." logger=context userId=0 orgId=1 uname= error="rendering failed: Error: Failed to launch the browser process!\n/usr/local/grafana/data/plugins/plugin-linux-x64-glibc/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n"
缺少lib库文件,然后查看ldd /usr/local/grafana/data/plugins/plugin-linux-x64-glibc/chrome-linux/chrome发现差了很多,配置好yum仓库后,根据not found的缺少的逐一安装。
我本地环境缺少以下:
yum install atk-1.28.0-2.el6.x86_64
yum install at-spi2-atk
yum install cups-libs
yum install libxkbcommon
yum install libXcomposite
yum install libXdamage
yum install libXrandr
yum install mesa-libgbm
yum install pango
三、再次点击pdf报错,grafana后台日志有报错日志:
/lib64/libnss3.so: version `NSS_3.22' not found
升级nss
yum update nss
正常生成。