The Best Free LAN Monitoring Software
Last Updated on Saturday, 28 November 2009 22:18 Written by Joe Aldeguer Wednesday, 05 August 2009 14:50
With the growing number of servers, workstations, firewalls, routers, switches, Virtual hosts and VOIP systems to manage at work, I needed a tool which could alert me at the first sign of trouble. Using Nagios to monitor my LAN, I am now able to proactively deal with problems before it becomes critical. If that does not impress the boss maybe the price will when you tell him or her you paid nothing for an Enterprise grade network monitoring tool!
Configuring Nagios is no easy task. A number of books have been written to help ease you into using the software. Luckily, GroundWork has released an intuitive community version web front end to manage Nagios complex configurations.
Disclaimer: This quick how-to guide was a compilation of what I have done so I could use Nagios using the web front end version 5.3 provided by GroundWork. This guide does not offer any guarantee this will work for you. Created for author's personal use.
I begin by downloading and installing VMware Server on a physical standalone box. I didn't want this machine running as another guest operating on my ESXi host, for obvious reasons.
Create an account with VMware to download VMware Server. Open the activation e-mail. Then login to start downloading VMware Server. Once logged in, you will find the serial numbers created for you to use. I'm going to run this on a Windows 2003 server. Download the VMware Server2 executable. Click on the installer, make a note where VMware server's installation creates the folder (Virtual Machines). This is where GroundWork's prebuilt VMware server will be placed. After completing the installation, I shall now proceed to download GroundWork's community version vmware virtual appliance.
Unpack the GroundWork virtual appliance file. Move it into the Virtual Machines folder. Launch VMware server by clicking on the Vmware server icon on the desktop.
You will get a warning regarding the certificate connecting either from IE or Firefox, since VMware server is using its own certificate. Once you have accepted the certificate you will be presented the login prompt.
Login using the local administrator account on the Windows 2003 server by clicking on the VMware server icon on the desktop.
Now that I'm logged in on the VMware control panel, I will import the Monarch Nagios appliance I have downloaded. Expand the storage | click on the folder GWMonitorCE53 | on the right window under contents | click GroundWork Monitor 5.3 CE.53 | click OK. This is the file of the guest operating system ending with a file extension .vmx, Vmware Server will run.
If the web control panel complains it can't find a datastore, click Add Datastore under commands | Name the datastore | Add the path to the folder called Virtual Machines | click OK.
By default the GWMonitorCE53 vmware server image is set to use 1 Gig of memory. I wanted to allocate more. Opening the Summary tab | clicking the drop down arrow on memory | edit. I will bump it up to 1512. The VMware image has to be shutdown while making the changes on hardware settings.
Start the guest operating system called GWMonitorCE53 by clicking on the green play arrow. When it starts, a message comes up. Choose copied it.
After starting the VMware appliance successfully, click on Console tab. You may need to install the plugin to make this work. Proceed with installing the plugin. Afterwards click anywhere to open the Console on a separate window.
The guest operating system begins to start.
You're now on the Desktop of the Monarch appliance running Nagios. Click anywhere on the Desktop to tell VMware you want to control the mouse running on the virtual machine. To release the mouse of the of the virtual guest operating system hit Ctrl-Alt. I need to find out what IP address the Monarch appliance is running on. To do this click on Applications | Accessories | Terminal.
Typing /sbin/ifconfig eth0 within the terminal will provide the IP address. Jot down the IP address number beside the word inet addr: this will be the IP address I will use to connect to the Web front end of Nagios. At this point I will first hit Ctrl-Alt to exit out of the desktop running on the virtual machine then click on the right top most x.
Launch a browser type in the IP address I wrote down earlier http://123.123.123.123 (replace this with you own IP.) You will get the login screen (Accept the security certificate when asked) of the GWOS web front end to manage Nagios! Login using the default username and password. admin, admin.
Once logged in, click on the orange square symbol on the top left corner to bring up the different menus to manage Nagios.
Click on the Administration menu. Expand Users | Edit the admin account | Put in new password | Click Finish.
Go back to the menu link by clicking the orange square icon again. Choose configuration | Control (top menu) | Nagios main configuration | Click on the box Enable Notifications: | Click Saved and Next.
Before commiting the changes click on | Pre flight test |. The web front end will check the submitted changes for any errors. If there were no errors found click on Commit | Backup | Commit. Remember to always do this whenever making changes to Nagios configuration!
Adding Contact Information:
Add in the contact information for anyone tasked to receive the Nagios alerts. Go to Contacts | Expand Contacts | Expand Copy | Click jdoe | replace the contact name | click on add nagiosadmin under contact groups to add this user to this group. For host notifications, I prefer to only receive reports when either Down and Recovery status are met. The host notification period is set to 24x7. For service notifications, I prefer notifications for Critical and Recovery only. Go to the process of committing changes. I make it a habit to make a backup first!
Adding Host Groups:
Click on the orange square icon | Configuration | Expand Host groups | click New | create a host group for your LAN | My HQ. | Highlight | nagiosadmin under Contact Groups | Click Add. You will not have any computer members to add at this point like I did on this image. This will come later when we start adding computers to monitor.
Time to begin adding computers on the LAN to monitor!
While still on this menu click on Host wizard | fill in the host information to monitor | for the host profile I chose service-ping for I want to use ping to determine if the host is up or down | click Next | leave the default host template to generic-host | add in a parent host or not | click Next | highlight the My HQ hostgroup we created earlier | click Add | click the drop down arrows and choose no to all | click Next | this particular host will be monitored using the ping command | click Continue.
Host group properties:
Ping profile:
I am ready to input the next computer in my LAN to monitor. Replace the hostname, alias, address with the new information and reuse the same profile host-profile-service-ping.
Adding a new port number to check:
I wanted to monitor Webmin on port 10000, but since this port is not in the list. I have to create a new command. Go to Commands | expand copy | click on check_tcp | change command name | replace the word ARG1, with 10000. This is the default port which webmin listen's for connections. Put in the host to check. Then click Test. When check succeeds click Add. I have the port number blotted out to minimize abuse.
Test check success.
With the new command check added I will now create a new host profile called Webmin-check. Go to Profiles | clikc New | create a name for the profile | click Add | click on the drop down arrow on Check command: | Choosing the command I created earlier. | click Save.
I will now modify the port being checked on my server. Go to Hosts | expand the server to modify | click details | click drop down arrow on check command | choosing Copy-of-check_tcp-webmin | as the new command | click Save. Go through the process of committing the changes once again.
After adding all of the hosts in my LAN to monitor I am now able to get a birds eye view on all of the machines on my LAN! Click on the square orange icon | Status. As you can see I have 51 hosts with a green background indicating the hosts are up. One service is marked as yellow for warning.
Purposely unplugging the network cable on two machines immediately registers on the status page. I also get an e-mail notification on my mobile device of which hosts are down. Clicking on the number of host down will show the names of the hosts down.
Sometimes there is no need to monitor a computer on a 24x7 period. For this I will create a new host template by copying an existing one ,then changing the time period. Nagios will check the computer. Go to main menu orange square icon | Configuration | expand Host templates | expand copy | click an existing host template | name it | change the Check Period: and Notification period: | to workhours | Save. By default this option is already set to check hosts from 9 am - 5 pm. If you need to change the time range go to | Time Periods | expand modify | click workhours | make the changes | Save. Don't forget to commit the changes afterwards!
After doing all that work adding hosts to monitor I will create a snapshot of the VMware Monarch appliance. I prefer to do this before updating the OS of the vmware appliance in case the update breaks some of the Nagios configuration. I could always revert back to the snapshot.
After completing the snapshot I will connect to the Nagios appliance using SSH. Then login as root with the default password as opensource. Change the root password immediately. Using the Linux command passwd.
Proceeding with the OS update.
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum update
Enter Y
This may take some time depending on my Internet connection.
After testing Nagios is working correctly after the update by logging into the GroundWork web control panel, I will proceed with replacing Sendmail with Postfix. While still login at the shell typing the commands below in italics.
yum install postfix
Since I am managing Nagios using a web front end, why not manage the server running Nagios using a web front end as well. Time to install Webmin.
The next part is to uninstall Sendmail.
Shutdown Sendmail
/etc/init.d/sendmail stop
rpm -e sendmail
Then restart Postfix.
/etc/init.d/postfix restart
Login to Webmin go to | Servers | Postfix Mail Server | General Options | Under the option "What domain to use in outbound mail" | click Save and Apply. I will place my registered domain name here. Otherwise e-mail from Nagios alerts will be rejected.
Check to make sure Nagios is able to send out notifications using Postfix, by purposely unplugging one of the machines being monitored. Login in to Webmin go into System | System Logs | click on View log file | browse to | /var/mail/nagios | click View.
The logs confirm Postfix was able to send the e-mail notification out.
Checking my webmail I do find the notification was sent by Nagios to my inbox. I also have it being forwarded to my mobile device.
Another cool thing using Nagios, it can also monitor a service running on the host. To monitor our web servers I use the http_alive. This option tells Nagios to make a connection to port 80 to determine if the web server is listening for connections. There are a number of built-in options I could use. It even allows me to create my own option to monitor a service. Highlight the type of service I want monitored then click Add to list | click Next | Continue. Don't forget to commit the changes.
The GroundWork web control panel even comes with a nice graphical reporting tool. Go to the Reports menu choose the date range then click Generate report.

It would be a good idea to sync the system clock with one of the public time servers. This task could be done through Webmin.
Backup and Recovery:
All of the work I had done on my Nagios machine almost got lost due to my Windows 2003 server restarting after an update. I forgot to change the automatic update setting to download only! When the Windows 2003 server started back up I had to go into VMware Server's GUI to start backup the Nagios virtual machine. Everything seemed to work just fine. I could see all of the server's being monitored in the status page. Until I tried to get to the other menu's, this time I was only getting an error page!
Most likely the configuration stored in MySQL got corrupted. I had to import another new Virtual image of Groundwork into Vmware Server, get it running, then move the virtual machine off VMware server and into ESXi server (I could have converted the old damaged VM but decided to do it from a fresh image.) Using VMware vCenter vConverter this Nagios virtual machine is now running on ESXi which is a type 1 hypervisor. After installing vConverter on one of my Windows machine it was very easy to convert it to a virtual machine for ESXi. The process only took 8 minutes. Advantages using ESXi.
Luckily I have the most recent backup of my configuration changes. I had to dowload the backup from the damage virtual machine. I just downloaded the mysql file with the latest date settings.
Path to the backup directory: /usr/local/groundwork/core/monarch/backup/
Restoring the database:
I had to reinstall Webmin again on this server. I will also use it to manage the Groundwork's MySQL database. I had to modify Webmin's MySQL module to use the directory where Groundwork installs MySQL.
Configuration path changes for Webmin's MySQL module:
Change all of the path for the different MySQL commands to: /usr/local/groundwork/mysql/bin
Path to MySQL databases directory: /usr/local/groundwork/mysql/data/mysql
Path to start MySQL: /usr/local/groundwork/mysql/scripts/myscript.sh
Click on Refresh Modules to allow Webmin to include the MySQL Database Server under the Server menu of Webmin. Refresh the browser.
Now Webmin is able to manage the MySQL databases. There is a message which states Webmin needs to install needed files to correctly manage MySQL. Click on it to install the files. This will allow scheduling backups for the databases.
To restore the database from backup. Click on the monarch database | Execute SQL | Run SQL from file | From uploaded file | Choose | browse to location of backup sql file. Click Execute.
Then reboot the Virtual Machine from the command prompt type.
reboot
Aftewards using a web browser connect to Web front end of Groundwork | login then go to the control menu | Commit | the changes so Nagios reads the restored configurations. And voila! I'm back in business.
From now on I will schedule a daily backup of all the MySQL databases using Webmin. Click on Backup Databases | Change the backup settings | Save.
I hope you get to add this powerful open source monitoring software into your sysadmin tool set. If you need to get support or get the commercial version offered by GroundWork you can get that information here. The Nagios official documentation could be obtained here.
bait@aldeguer.us
























































COMMENTS: (Abusing this comment form with spam would be the most effective way to have your IP, network or country blocked!)
This is a really cool guide and we at GroundWork appreciate you taking the time to document it. We actually just released our 6.0 beta on VMWare. It came out last week. We are actively soliciting community feedback and since you've used 5.3, we'd really like to hear what you have to say! You can get it at http://www.gwos.com/community/downloads/
Please also drop me a line privately. I'll send you a t-shirt (whether you have time to install the 6.0 or not.) I'm amya at gwos dot com.
Have a good one!