基础信息
- 物料
- grafana:
grafana-enterprise-9.3.6-1.x86_64 - grafana-reporter:
2.3.1github.com/IzakMarais/… - grafana-image-renderer:
3.6.3grafana.com/docs/grafan…
- grafana:
- 操作系统版本:
CentOS Linux release 7.9.2009 (Core)
部署操作
- 按照grafana-reporter文档编译grafana-reporter
- 启动grafana-reporter
# ip需要指向grafana链接地址
./grafana-reporter -ip="10.63.98.255:3000"
3.安装grafana-image-renderer
# 需要指定plugins安装路径
grafana-cli --pluginsDir /data/grafana/plugins plugins install grafana-image-renderer
4.安装相关的依赖包
# pdf生成相关的包
yum install texlive-latex-bin texlive-xetex-bin texmaker texlive-latex
# renderer相关的包
yum install -y alsa-lib.x86_64 atk.x86_64 cups-libs.x86_64 gtk3.x86_64 ipa-gothic-fonts libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXrandr.x86_64 libXScrnSaver.x86_64 libXtst.x86_64 pango.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-cyrillic xorg-x11-fonts-misc xorg-x11-fonts-Type1 xorg-x11-utils
yum update nss -y
5.grafana上配置图表链接
异常处理
# 参考操作步骤4中"pdf生成相关的包"操作
error calling LaTeX preprocessing: "exec: \"pdflatex\": executable file not found in $PATH". Latex preprocessing failed with output:
# 参考操作步骤4中"renderer相关的包"操作
Feb 8 17:34:33 taqu-online-pms004 grafana-server: logger=context userId=0 orgId=1 uname= t=2023-02-08T17:34:33.344130113+08:00 level=error msg="Rendering failed." error="rendering failed: Error: Failed to launch the browser process!\n/data/grafana/plugins/grafana-image-renderer/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"
Feb 8 17:34:33 taqu-online-pms004 grafana-server: logger=context userId=0 orgId=1 uname= t=2023-02-08T17:34:33.34426955+08:00 level=error msg="Request Completed" method=GET path=/render/d-solo/pt1cO_0Vz/_ status=500 remote_addr=10.63.98.255 time_ms=18 duration=18.594278ms size=1344 referer= handler=/render/*