天天看点

Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:

背景

基于Grafana监控看板,大多数数据源都支持报警,需求通过WebHook支持报警!!!

操作步骤

安装grafana-image-renderer插件

grafana-cli plugins install grafana-image-renderer
           

重启Grafana 、Grafana会自动启动Grafana-image-render插件

Rendering failed: Error: Failed to launch chrome!/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome:
error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
           

原因:

     error while loading shared libraries: libX11.so.6: 缺少这个依赖包

解决方案,一键安装所有的so文件

yum install libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config
           

 配置

Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:
Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:

验证

Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:

点击【Direct link rendered image】看是否可以生成!!!

配置WebHook及效果

Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:
Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:

注意:

Grafana WebHook 报警通知踩坑系列,支持报警截图发钉钉卡片报警!!!注意:

官方提供的参数模板和实际验证不符,请查看日志,以实际为准。

参考:

  •  https://grafana.com/docs/grafana/latest/administration/image_rendering/
  • https://grafana.com/grafana/plugins/grafana-image-renderer/

继续阅读