Little side project: Monitoring System

Been debating on how to keep an eye on my home network and decided to take a swing at getting a monitoring system built from scratch to build my coding skills more. General idea:

  • Have a list of devices stored in a database with information such as IPs and names
  • Pull this device list, and run a ping sweep on all devices to test for activity/status
  • Log this into the database for reference
  • Build a lightweight front end to show this information at a glance

At this point, I’ve gotten a basic running version of this on a dedicated Linux system (Ubuntu 12.04LTS with a LAMP install). It’s extremely fast and runs every 5 minutes out of a cron entry. I’ve gotten most of the items done:

  • Database has multiple devices which can be added through front end GUI based off PHP
  • GUI (webpage) refreshes every 60 seconds and shows the last pull status along with logs from recent pulls to look for trends
  • Cron entry kicks off Perl poller that pulls information from DB and pings each device; 10 devices in less than a second total
  • Stable and has been working without issue for a few days now

I’ve also gone and tested a few of the devices, unplugging them and what not and still show up without issue. Mind you, this is a dirty way to show this information and needs cleaning, but it works. Next goals are to clean up the dashboard a bit, maybe add a search tool in the near future and some color logging to note the bad devices. Who knows, maybe a ticket system in the future? Stay tuned as always!

 

Optimization WordPress Plugins & Solutions by W3 EDGE