You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

You can also send messages over the HTTP based API. That can be used to let external services post messages to your channels or to a specific person.
Here an example for a script

#!/bin/bash
Receiver=$1
Message=$2
curl -X POST -F "receiver=$Receiver" -F "msg=$Message" -F "apikey=YourSecretKey" https://your-domain/modules/addons/slackforwhmcs/API.php --silent

Then you can send messages using this command:

./send_slack "@channel@$(hostname)" "My CPU temperatur is too high. Can you please check me urgently?"
  • No labels