- Send a message to slack using shell script
bash shell script
Incoming Webhooks of Slack
vi monitor.sh
# Your process list
processes=(nginx php-fpm)
# Your host list
hosts=(127.0.0.1 localhost)
vi send.sh
# Your channel name : #general
channel="#general"
# Your hook url
hook_url='https://hooks.slack.com/services/##########################'
sh monitor.sh
#or clontab
@reboot /Your Path/monitor.sh