A couple of weeks ago I installed the Network Monitoring Appliance using the tutorial on HowToForge.com. Prior to installing the Network Monitoring Appliance I was planning to give the latest community version of GroundWork Monitor, http://www.groundworkopensource.com/products/community-edition/index.html another trial. My network monitoring objectives were to have the Network Monitoring appliance notify me of problems on a remote web server and on my local network. Although these network monitoring objectives can be accomplished by a ping or a â€œHTTP pingâ€, I wanted to see a some network throughput graphs and I expected to eventually need a slightly more sophisticated data base monitoring in the near future. Nagios was at the core of the best solution for me since accomplished most of my needs and I was already familiar with Nagios from a previous trial of Groundwork Monitor. The primary attraction of the Network Monitoring Appliance over Groundwork was its much smaller resource requirements. In my environment it would be sharing a VMware ESXi server. I was also pleased to see that the Network Appliance used Jeos. For those unfamiliar with Jeos it is:
Ubuntu Server Edition JeOS (pronounced "Juice") is an efficient variant of our server operating system, configured specifically for virtual appliances.
Users deploying virtual appliances built on top of JeOS will benefit from:
- better performance on the same hardware compared to a full non-optimized OS
- smaller footprint of the virtual appliance on their valuable disk space
- fewer updates and therefore less maintenance than a full server installation
For my installation I decided to use VMwareâ€™s 32-bit Ubuntu template to create the virtual machine. The only modification to the template was to adjust the disk drive size down from 8 GB to 1 GB. As described in HowToForge tutorial I installed the following programs.
- Ubuntu 8.04.3 JeOS as OS
- Nagios 2.11 for monitoring and alarming
- Smokeping 2.3 to observe latencies and packet loss
- MRTG 2.14.7 to observe network traffic’s tendencies
- RRDTool 1.2.19 as the Round-Robin Database for storing all measurement data
- Lighttpd 1.4.19 as a fast, lightweight web server frontend
- Weathermap4rrd for illustrating the network weather
- sSMTP as extremely lightweight MTA for mail delivery
The installation was quick. Almost all of my challenges was in configuring the programs. Fortunately I had previous experience configuring the most difficult to configure programs, Nagios and MRTG. It helps if you have a basic knowledge of PERL since most of programs use it. Here are my installation notes.
- One of the first things I needed to install to make this installation go smoother was an editor other than VIM so I could cut-and-paste from the tutorial to my SSH session. In my case I installed nano.
- The first application I configured was smokeping. The configuraton file is pretty easy to figure out and can be found at /etc/smokeping/config. If everything works you will see a nice graph of the the ping statistics at http://yourip/cgi-bin/smokeping.cgi.
- Configuring Nagios is a bit more complicated. Since this is version 2 of Nagios, the configuration files are located at /etc/nagios2/conf.d. The main Nagios web page is at http://yourip/nagios2/. The Nagios QuickStart Document, http://nagios.sourceforge.net/docs/3_0/quickstart.html, is a good primer for the folks not familiar with Nagios.
- The Debian logo did not appear in Nagios next to the localhost. It showed a missing image. After a little research I figured out that I needed to install nagios-images using apt-get install nagios-images.
- For some reason I did not seem to have cron installed and running. This is easily solved by apt-get install cron.
- MRTG is useful if you have a SNMP router to poll. I used my pfSense Firewall as the SNMP source. MRTG provides some nice graphs of network traffic and its page is located at http://yourip/cgi-bin/mrtg-rrd.cgi/
- Configuring Weathermap4rrd is a little challenging since the documentation is sparse. Weathermap4rrd provides a clever network status graph once you figure how to configure it. It uses the same data as MRTG to create its graph. The network status page for weathermap4rrd is located at http://yourip/weathermap4rrd/weathermap.png
- I installed apticron to nag me via email about installing security updates and Logwatch to find any problems posted in the log file by the installed programs.
- If you plan on getting emails from Nagios when a host is down, you should test it. Duh! The easiest way to test it is to deliberately mistype the host name. If you do not get the email, you should check your Nagios configuration, sSMTP configuration, and the SMTP log file.
- sSMTP is easy to configure and use. In the simplest configuration you point it at the SMTP server you are sending your emails to. If you are sending emails to more than one domain, you need to connect to a SMTP server that will relay emails for you.
- I installed PHP version 5 to see how hard it would be to install under Lighttpd. I followed the instructions on the Lighttpd wiki and PHP appears to be running without problems. Most of these network monitoring programs have newer versions in PHP. Some day in the future I plan to migrate to the PHP versions of Nagios and weathermap but it is not necessary for this small network.
- I created a simple navigational menu on the main page with links to the various network management status pages. It is much easier to use this menu then remembering the addresses of the different status pages.