Site monitoring Code
Monitoring of websites with spider and email notifications
Brought to you by:
jirkapinkas
I. RUNNING MONITORING: ======================= First you must install Java! http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u30-download-1377139.html Next Windows: 1. run start.bat 2. point your browser to page: http://localhost:8080/Monitoring 3. have fun :) 4. read rest of this file for additional configuration Linux (any other *nix OS should work, but it's not tested): 1. chmod +x *.sh 2. ./start.sh 3. point your browser to page: http://localhost:8080/Monitoring 4. have fun :) 5. read rest of this file for additional configuration II. CONFIGURATION: ================= all configuration files are in directory /conf: WARNING: If you change this configuration, you must restart site monitoring! (run stop.bat/stop.sh and afterwards start.bat/start.sh - run .bat file on Windows and .sh on Linux) mail.properties: Connection to mail SMTP server. Default is for GMAIL, but you can easily change that (GMAIL is great for testing, however). Set there your GMAIL username and password. If you have your own SMTP server, overwrite files conf/mail.properties and conf/mail.xml with files conf/mail-localhost/mail.properties and conf/mail-localhost/mail.xml. mail.xml: Mail configuration defined for GMAIL. Connection properties are defined in mail.properties. cron.properties: Default values useful for monitoring. Scheduled monitoring is scheduled here to execute after 10 minutes delay. Also review timeout settings if you get plenty of timeouts. This setting is highly dependent on your network. If you want to enable spider to check your site for broken links, you must set path to linkchecker executable in this file. db.properties: Connection to database, currently only HSQLDB database. So far HSQLDB seems fine (I'm using this application to monitor my web sites). However I designed this application so that in the future it will be easy to support different database servers if required. III. INTEGRATING SPIDER: ======================== 1. download and install LinkChecker: http://linkchecker.sourceforge.net/ 2. set path to linkchecker executable in cron.properties 3. restart Site Monitoring 4. have fun :) IV. TURNING ON SECURITY: ======================== 1. copy file security.xml from conf/security-basic to conf/ 2. in security.xml is defined one user with username "admin" and password "admin". You can change password or username or even add another usernames. 3. restart Site Monitoring 4. now your application is secured