muninの通知をslackにポスト

Slack

https://gist.github.com/anarchivist/58a905515b2eb2b42fe6

をフォーク
https://gist.github.com/kurita0/5374c3a81fc8d5070fcdc0855e43916d

The 2>&1 should be removed from the curl command; this gives the following error

line X: 1: Bad file descriptor

This is due to how munin works these days - munin v 2.0.37-1ubuntu0.1 - ubuntu 18.04

https://gist.github.com/anarchivist/58a905515b2eb2b42fe6?permalink_comment_id=2874368#gistcomment-2874368

Discord

https://discord.com/developers/docs/resources/webhook

はじめに結論
Discord から発行される WebHook URL

/webhooks/{webhook.id}/{webhook.token}

の末尾に /slack をつけ、Slack API として Gitlabに登録する

/webhooks/{webhook.id}/{webhook.token}/slack

Gitlab と Discord をSlack WebHook互換を使ってサクッと連携させる。 #GitLab - Qiita 2024

channel はない

改行、タブが入るとエラー。 \n \t に置き換える

{"message": "Cannot send an empty message", "code": 50006}  

Discordへのjsonリクエスト内で改行したい 2018

Discordにwebhook経由でPOST(cURL) #HTTP - Qiita 2025