Use slack_pipe to just send quoted text through a pipe to slack.
Example:
echo arne | ./slack_pipe
SLACK_HOSTNAME="myslackgroup.slack.com"
SLACK_CHANNEL="#ops"
SLACK_USERNAME="icinga2"
SLACK_URLs="your slack hook url"
#example:
#SLACK_URLs="https://hooks.slack.com/services/SOMETHING/SECRET/TOKEN"
#!/bin/bash
this_dir=$(cd `dirname $0`;pwd)
. $this_dir/slack.conf
#================================
# MAIN
#================================
output=$(cat | perl -pe 's/\e\[.*?m//g' | perl -pe 's/\n/\\n/g' )
for SLACK_URL in $SLACK_URLs
do
[ -n "$debug" ] && set -x
curl -X POST --data "{\"channel\": \"${SLACK_CHANNEL}\", \"username\": \"${SLACK_USERNAME}\", \"text\": \"\`\`\`${output}\`\`\`\"}" "$SLACK_URL"
[ -n "$debug" ] && set +x
cat<<EOT
EOT
done