GrafanaのイメージがSlackへ転送できなくなったので対処した話


Grafanaを6.4.1で運用していましたが、ふとバージョンをあげてみたところ
Slackへ通知していた画像が送られなくなったので対処しました。

手順としては
https://grafana.com/docs/grafana/latest/administration/image_rendering/
こちらに書いてある通りですが、
適当に読んで重要な部分をすっかり読み飛ばしてしまう私のような人の助けになれば・・・。orz

Image rendering プラグインの導入

Grafana Image Renderer なるものがないということで、サクッと導入しました。
https://grafana.com/grafana/plugins/grafana-image-renderer/installation

grafana-cli plugins install grafana-image-renderer

ん? なにかよく見た画像になった

grafanaの通知テストとかで表示される画像ですね。
私はここで彷徨ってしまいました。ちゃんと書いてあるのに・・・。
はい、答えは最初のマニュアルのトラブルシューティング。

足りないシステムの補完

Ubuntu:
On Ubuntu 18.10 the following dependencies have been confirmed as needed for the image rendering to function.

libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2  libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2

Debian:
On Debian 9 (Stretch) the following dependencies have been confirmed as needed for the image rendering to function.

libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0

On Debian 10 (Buster) the following dependencies have been confirmed as needed for the image rendering to function.

libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 libatspi2.0-0 libgtk3.0-cil libgdk3.0-cil libx11-xcb-dev

Centos:
On a minimal Centos installation, the following dependencies have been confirmed as needed for the image rendering to function:

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

私は CentOSを利用しているので、 yum install ~ (dnf install ~)で完了です。

ほんと、ただの自分のおっちょこちょいなんだよなぁ・・・。