This small ruby script is written as a school project.
The intention is to monitor ports over TCP connection. Append the results in a MySQL database, and notify via gmail / google apps mail, if a port isn't connectable.
You could run it as a cron job, or make a

while true
....
sleep 300


Remember to install the gems.
ignore the warnings from tlsmail.

MySQL instructions:

mysql -u root -p
<root password here>

CREATE DATABASE sites;
GRANT ALL ON sites.* TO USER@localhost IDENTIFIED by 'PASSWORD';

exit

replace USER with your username, 'PASSWORD' with your password. You might also want to replace 'sites' with your own database.
The script will create tables needed the first time it's being executed.

Remember to replace the websites and ports in sites.conf
Remember to insert your own values in login.conf

Project Activity

See All Activity >

Follow TCP-Watcher

TCP-Watcher Web Site

Other Useful Business Software
Simple, Secure Domain Registration Icon
Simple, Secure Domain Registration

Get your domain at wholesale price. Cloudflare offers simple, secure registration with no markups, plus free DNS, CDN, and SSL integration.

Register or renew your domain and pay only what we pay. No markups, hidden fees, or surprise add-ons. Choose from over 400 TLDs (.com, .ai, .dev). Every domain is integrated with Cloudflare's industry-leading DNS, CDN, and free SSL to make your site faster and more secure. Simple, secure, at-cost domain registration.
Sign up for free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of TCP-Watcher!

Additional Project Details

Registered

2012-06-23