天天看點

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/

繼續閱讀