chatops on davidchua https://dchua.com/tags/chatops/ Recent content in chatops on davidchua Hugo -- gohugo.io en-us Tue, 27 Dec 2016 00:00:00 +0000 Monitor a Directory for File Changes with inotifywait https://dchua.com/posts/2016-12-27-monitor-a-directory-for-file-changes-with-inotifywait/ Tue, 27 Dec 2016 00:00:00 +0000 https://dchua.com/posts/2016-12-27-monitor-a-directory-for-file-changes-with-inotifywait/ Sometimes there may be a need to monitor and be alerted when any new files have been added in a particular directory. One of the quickest way to do that is to use inotifywait. You can find it in the inotify-tools package. If you don’t have it yet, you can install it with apt-get install inotify-tools if you’re on Debian/Ubuntu. Create a nice looking bash script. Maybe something called watcher.sh, copy the following script and fire away! Secure your Server - Send Slack Alert on SSH Login https://dchua.com/posts/2016-08-17-secure-your-server-send-slack-alert-on-ssh-login/ Wed, 17 Aug 2016 00:00:00 +0000 https://dchua.com/posts/2016-08-17-secure-your-server-send-slack-alert-on-ssh-login/ In my line of work, besides architecting and building infrastructure, part of the scope includes building safeguards to ensure that systems that were setup are properly secured. Here’s a quick trick for folks looking for an easy first-line defence that they can implement easily across their servers right now. In order to quickly respond to a server compromise, it is a good idea to setup some form of IDS to alert you when a potential headache is about to happen.