Slackboard • Slack proxy server in Go • https://github.com/cubicdaiya/slackboard • Provides 3 commands • slackboard - proxy server daemon for Slack • slackboard-cli - client for slackboard • slackboard-log - client like cronlog for slackboard
Difference between /notify and /notify-directly • POST /notify • receives original payload • tag-based notification • POST /notify-directly • proxies payload to Slack directly • channel-based notification
Asynchronous or synchronousʁ • slackboard proxies message to slack asynchronous by default • “sync”: false • slackboard returns 200 OK to client at once • “sync”: true • slackboard return 200 OK after posted message to Slack
Colorize message by POST /notify echo information | slackboard-cli -t test -s slackboard-server:29800 -l info echo warning | slackboard-cli -t test -s slackboard-server:29800 -l warn echo critical | slackboard-cli -t test -s slackboard-server:29800 -l crit TMBDLCPBSE POST /notify Post to Slack
Colorize message by POST /notify-directly echo good | slackboard-cli -c random -s slackboard-server:29800 -C good echo bad | slackboard-cli -c random -s slackboard-server:29800 -C bad echo warning | slackboard-cli -c random -s slackboard-server:29800 -C warning TMBDLCPBSE POST /notify-directly Post to Slack
Alerting to Slack with slackboard-cli # copy log file to Google Cloud Storage gsutil cp 2015-03-05T08.log.gz gs://${bucket}/ result=`echo $?` if [ $result -ne 0 ]; then echo "@channel: failed to copy log to GCS(2015-03-05T08)” | \ slackboard-cli -s slackboard-host:29800 -t error-gcs fi
Why is proxy server for Slack required? • Messages are posted from various servers • Where are messages posted from? • Messages are posted from various programs • Perl?Python?PHP?Ruby? or… Which library? • Different by engineer and team
It’s painfulʂ • Incoming Webhooks URL is staggled in various servers • What if URL is changed? • Each client program uses different language and libraries • (ϊ ʄДʄ)ϊ~~~ᵲᵲ
Summary • Slackboard provides • Proxy server daemon for Slack • Client for slackboard • The goal of Slackboard • Aggregate messages to Slack • Unifies method for posting message to Slack