Swatcher
is a log watching tool that send important and specified logs to slack INCOMING WEBHOOK
using swatch. It corresponds now to ssh
log and ftp
log.
Replace YOUR_INCOMING_WEBHOOK_URL
, then run it.
curl -sL https://raw.githubusercontent.com/yousan/swatch/master/init.sh | \
sudo YOUR_INCOMING_WEBHOOK_URL=xxx bash -
You should change <YOUR_INCOMING_WEBHOOK_URL>
in /etc/swatcher/swatcher.conf
if you didn't set YOUR_INCOMING_WEBHOOK_URL
when installing.
The swatcher
uses systemd
. You can sure that systemd loaded swatcher
successfully as a unit, using sudo systemctl status swatcher
command. If it's status is loaded
, it success loading swatcher.service
.
After you check that, run typing below command.
sudo systemctl start swatcher
And you can stop to type a below command.
sudo systemctl stop swatcher
And also do restart.
sudo systemctl restart swatcher
sudo systemctl enable swatcher
If you uninstall swatcher, you can run this
curl -sL https://raw.githubusercontent.com/yousan/swatch/master/uninit.sh | sudo bash -
You can change settings for swatcher on /etc/swatcher/swatcher.conf
.