yousan / swatcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is Swatcher?

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.

Install

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 - 

and!!

You should change <YOUR_INCOMING_WEBHOOK_URL> in /etc/swatcher/swatcher.conf if you didn't set YOUR_INCOMING_WEBHOOK_URL when installing.

Check if swatcher is loaded successfully

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. Successfully loaded

Run Swatcher

After you check that, run typing below command.

sudo systemctl start swatcher

Stop Swatcher

And you can stop to type a below command.

sudo systemctl stop swatcher

Restart Swatcher

And also do restart.

sudo systemctl restart swatcher

Auto start with reboot

sudo systemctl enable swatcher

Uninstall

If you uninstall swatcher, you can run this

curl -sL https://raw.githubusercontent.com/yousan/swatch/master/uninit.sh | sudo bash -

Configuration

You can change settings for swatcher on /etc/swatcher/swatcher.conf.

Japanese Explanation (by yousan)

https://qiita.com/yousan/items/e89603ba1c638be5f1c7

About


Languages

Language:Shell 100.0%