websitemon is a simple java CLI tool which checks whether the call to one or more URLs is answered with the expected HTTP code (defaults to 200). It also offers the option of notifying an email address if any check fails. I have implemented the tool for my own use and would like to share it here - maybe it will also be helpful for someone else.
- Download latest version from https://soumasoft.com/websitemon/ and unzip websitemon.jar to a directory of your choice
- Open the command line interface of your system and navigate to the directory where websitemon.jar is placed
- prepare websitemon (init database) with following command:
java -jar websitemon.jar -cmdInstall
- add the website(s) you want to monitor:
java -jar websitemon.jar -cmdAdd https://soumasoft.com;https://google.com;http://your-website.com
- let websitemon check website states
java -jar websitemon.jar -cmdCheck all
# note: '-cmdCheck all' is optional, because this is the default command
If the setting 'settMailReceiver' is filled with an email address, websitemon will send a notification to this address whenever the HTTP response code is different than the expected one. Corresponding SMTP settings are of course also necessary to be able to send emails.
- Update the settings "settMailReceiver" and all SMTP-Settings with following command (replace example parameters and newlines before you copy the command into your CLI):
java -jar websitemon.jar -cmdSettPersist
-settMailReceiver [email protected]
-settSmtpHost smtp.yourmailserver.com
-settSmtpSender [email protected]
-settSmtpUser your_smtp_user
-settSmtpPassword your_smtp_password
-settSmtpPort 465
-settSmtpSSL true
- now you can check your settings using following command:
java -jar websitemon.jar -cmdMailtest
The main functions of websitemon have already been described. For information about further commands please use the help:
java -jar websitemon.jar -cmdHelp
websitemon is absolutely free. Nevertheless, I would appreciate a donation if you use and like the tool :)
https://soumasoft.com/websitemon/#donation