#ShinChan
ShinChan is a logging tool, based on top of python's logging library, in addition to managing and writing your logs, it provides a system to log and send critical messages as email, so that one can take immediate action.
It is specifically usefull for people who are running python scripts in the background and want to be notified immediately whenever something goes wrong, ShinChan being very light weight and easy to setup makes it ideal for getting critical notifications.
You can potentially have only one node which serves as the
work server, monitoring server, mongo server, smtp server
pip install shinchan (Work Server)
git clone https://github.com/asamat/shinchan.git (Monitoring Server)
http://docs.mongodb.org/manual/installation/
https://help.ubuntu.com/community/Postfix
Please refer https://github.com/asamat/shinchan/blob/master/shinchan/config/logging.conf
# module_type and config_file_path are mandatory
# module_type is the tag you want to associate to your log files(this can tyipcally be same for a set of modules which are working for the same task)
# config_file_path is the full path to the config file
lg = Logger(module_type = "PREPROCESS", config_file_path = "/somedir/logging.conf" )
#usage
lg.info(message)
lg.warn(message)
lg.critical(message)
lg.error(message)Please refer https://github.com/asamat/shinchan/blob/master/shinchan/config/alert_config.conf
- cd ~/download_dir/shinchan/shinchan
- vi config/alert_config.conf (Make edits as per your requirements)
- Start: ./sc_monitor start
- Stop: ./sc_monitor stop
- Restart ./sc_monitor restart
