Grafanaで特定条件時に通知を送信することができますが、その通知にグラフの画像を添付することが可能です。
今回はその方法を紹介します。

環境
- CentOS7
- Grafana 7.2.2
画像を添付する設定
アラート通知時に画像を添付するための設定は簡単で Alerting → Notification channel でチャンネル一覧を表示します。
一覧から画像を添付したいNotification channelを選択し、 Notification settings の Include image にチェックを入れSaveで保存するだけです。これで文字だけではなく視覚的にアラート内容を把握することができます。

エラー画像が添付される場合
アラート通知で画像が添付されるようになっても以下のようなエラー画像となってしまう場合があります。
No image renderer available/installed
For Grafana to be able to generate an image you
need to install the Grafana Image Renderer plugin.
Please contact your Grafana administrator
to install the plugin.

この場合はプラグインをインストールする必要があるので以下の手順を実施してください。
- Plugins で image renderer と検索し、該当のプラグインをインストール
- Grafanaサーバを再起動
systemctl restart grafana-server
以上です。
コメント