Windows 7 Upgrade from Windows XP Home

I think I can finally say that I have finished the upgrade, Free Cell is installed ;). This summer I installed Windows 7 RC and was pleased with the performance and the look and feel on my 3 year old laptop. It would have been nice if I could have just upgraded  the RC version but I was going the Professional version rather than to the Ultimate version. Since I had previous partitioned my disk and cleaned up the disk space I was in pretty good shape for a clean install. The hardest part of the install was install the device drivers for the old QMS printer and Epson scanner. Support for these devices was not included in Windows 7 so I had to install the old XP drivers using the XP compatibility mode.

Notes on Installing the Network Monitoring Appliance

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.

  1. Ubuntu 8.04.3 JeOS as OS
  2. Nagios 2.11 for monitoring and alarming
  3. Smokeping 2.3 to observe latencies and packet loss
  4. MRTG 2.14.7 to observe network traffic’s tendencies
  5. RRDTool 1.2.19 as the Round-Robin Database for storing all measurement data
  6. Lighttpd 1.4.19 as a fast, lightweight web server frontend
  7. Weathermap4rrd for illustrating the network weather
  8. 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. For some reason I did not seem to have cron installed and running. This is easily solved by apt-get install cron.
  6. 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/
  7. 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
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.

Updated Script for emailing ntbackup log files

Jason left a comment on a previous post about wanting to see the script I am using to email NTBackup log files. Recently I converted the script to powershell from vbs. Here is the old file.

#**************************************************
# Script Name: 	Ntbackup_E-Mail_Alert
#     Version: 	1.0
#      Author:	Bill Huber
#Last Updated:	19.Nov.2009
#
#     Purpose:	Concatenates two or more log files into the body of an email message. I schedule
#				this script to run at a time the backup job should be finished and to send me 
#				the latest NTBackup log files as an email with a somewhat informative subject field.
#
#		Legal:	Public Domain.  Modify and redistribute freely.  No rights reserved.
#              	SCRIPT PROVIDED "AS IS" WITHOUT WARRANTIES OR GUARANTEES OF ANY KIND.
#              	USE AT YOUR OWN RISK. NO TECHNICAL SUPPORT PROVIDED.
#**************************************************

# Customize the following variables for your SMTP server, email from address,
# email address the message is going to, the minimum log size, and the log path.
 
$SmtpServer = "mySBServer" 
$From = "mySBServer Administrator <administrator @myCompany.com>"
$To = "billhuber@myCompany.com"
$intLogSize = 1000 		#If the log file is less than this size, the backup probably failed
#The following variable point to the log file location
$logpath = "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\*.log"

# End of Customization

$SmtpClient = new-object system.net.mail.smtpClient
$SmtpClient.host = $SmtpServer 

#Get the filenames and other stuff for the last two log files
#We are going to concatenate the last two log files into the body of the email message

$a = get-childitem $logpath | sort-object lastwritetime | select-object -last 2
#Get the last write time for the last report for the subject line
$b = $a | sort-object lastwritetime -descending | select-Object -first 1
$c = $b.LastWriteTime
$d = $b.length

$Title = "SUCCESS - Full Backup at $c"
if ($d -lt $intLogSize){
	$Title = "ERROR - Full Backup Failed at $c"
	}
$Body = ""
 foreach ($line in Get-Content $a)
    {
    $Body += "$line `n"
    }
 
$SmtpClient.Send($from,$to,$title,$Body)