Coming Soon… The Great Conficker Battle of 2012

Oh yes, it hasn’t gone away just yet, Conficker is still as big as ever. To get some background try this link:

I will be posting my personal experience very soon, well as soon as its over…

New Final Year Project Site

I have just converted by FYP micro-site into WordPress, so if your interested in virtualisation and private clouds head over to:

Graduation Ceremony 2012

My Graduation Ceremony took place yesterday ay Symphony Hall, Birmgham.

The pictures can be founf here:

Nagios Notification Script

Originally posted at (

I decided to write my own script for Nagios to send emails to external addresses when MS Exchange goes down in our organisation (which has been happening quite often lately!)

my file is called by a command created in the nagios command.cfg file as below:
#Exchange notifications
define command{
command_name notify_ex_mail

The “$PARAMETER$” inputs are created by nagios and therefore would not make sense outside of a Nagios config file.

my file is here:
## Send mail notification when nagios detects a problem - manual overide from Nagios defaults ##
## Script By Jonathan Ward 26/09/2011 ##
##Parameter List as defined in /etc/nagios3/commands.cfg
## $1 = Notification Type e.g. “PROBLEM”
## $2 = Service Description e.g. “Explorer.exe” OR “SMTP Status”
## $3 = Host Alias e.g “MyExchangeServer”
## $4 = Host Address e.g. “”
## $5 = Service State e.g. “CRITICAL”
## $6 = Long Date and Time e.g. “Mon Sept 26 16:07:21 BST 2011”
## $7 = Service Output
# #$8 = Contact Email
##Set Message Subject - spaces won’t work?
msgsubject=’Exchange Issue’
##Set Email Addresses with spaces not commas etc.
##Set Message Body
msgbody=”Nagios is reporting $1 on $3 \n \nService $2 State is: $5 \n \nTime Reported: $6”
##Create subject in file /etc/nagios3/mailbody
#echo -e “$msgbody” > /etc/nagios3/mailbody
##Command to send email with subject and body
#mail -s “$msgsubject” “$msgto”
echo -e “’$msgbody’” | mail -s “$msgsubject” “$msgto” #using internal echo as body - prints -e in emails???
##delete body file for next run
#rm -f /etc/nagios3/mailbody
##Debugging lines go here…
# echo -e “$1 \n$2 \n$3 \n$4 \n$5 \n$6 \n$7 \n$8” > /root/scriptdebug #Copies values of parameters on seperate lines in /root/scriptdebug file
## /etc/nagios3/ “notifcation type” “service description” “host alias” “host address” “service state” “long date time” “service output” “contact email”

Linux Script for monitoring Machine Room temperatures

Following on from one of my first projects at BMS, where I installed a server monitoring solution called Nagios, I have taken things one step further and started using the nagios scripts to provide in depth monitoring which I can target at specific people etc. I have used my knowledge gained from my older Nagios Notifcation Email script as reposted on this blog here.

The plan was to use the Dell OpenManage plugins that I spent so long configuring within Nagios, to send temperature updates via email. The final script (after 4+ hours testing etc.) looks like this:

## Send mail notification of Machine Room Temperatures##
## Script By Jonathan Ward 01/02/2012##

##./ (was spereate script)##
rm /root/temperatures
echo -e “Machine Room 1 status: ” > /root/temperatures
/usr/lib/nagios/plugins/check_openmanage -H [ipaddress] —only temp » /root/temperatures
echo -e “\n\nMachine Room 2 status: ” » /root/temperatures
/usr/lib/nagios/plugins/check_openmanage -H [ipaddress] —only temp » /root/temperatures

##Set Message Subject
msgsubject=’Machine Room Temperatures’

##Set Email Addresses with spaces not commas etc.

##Command to send email with subject and body
mail -s “$msgsubject” “$msgto”

#echo -e “$msgbody” > /root/mailtest

Now I know this looks a little crude, and could be tidied up with some symbolic links etc. but it is a simple solution and I have scheduled a cron job to run the script 4 times a day…

The output in the email looks like this:

Windows Server Backup with DAG

Following on from the Exchange 2010 issues I’ve been having, my last hurdle has been backups. I couldn’t figure out for the life of me why the daily backups of my Exchange installations were failing. So I followed a couple of YouTube videos and made minor changes. This still didn’t work, so after a day of not thinking about it, and clearing my mind I finally found this solution, which worked a treat:

Using Windows Server Backup on Database Availability Group Members

If a server hosting the data being backed up is a member of a database availability group (DAG) and hosts both active and passive database copies, you must disable the Microsoft Exchange Replication service VSS writer. If the Microsoft Exchange Replication service VSS writer is enabled, the backup operation will fail.

To disable the Microsoft Exchange Replication service VSS writer, perform the following steps:

Log on to the server by using an account that has local administrator access, and then start Registry Editor (regedit).
Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\ExchangeServer\v14\Replay\Parameters.
Add a new DWORD value named EnableVSSWriter, and set its value to 0.
Exit Registry Editor and then restart the Microsoft Exchange Replication service.

This solution is found here:

Web Development Projects

In my spare time (limited though it is!) I have been working on a website for a local church (where my better half happens to work) and am quite impressed with the start that’s been made…

So how about visiting - and if you have any ideas or suggestions fill in the form on the Contact page.

I have also redone my homepage at: and modified some settings on my main blog to fix the URL rewrites ( not bad for a new year so far…

Exchange 2010 Failure


It seems that after I’ve finally built a redundant Exchange 2010 cluster with DAG that I needed a reboot on one of the servers (due to some other reconfiguration) - unfortunately I had forgotten the server hadn’t been rebooted since before AVG Business Edition was installed, oops, this appears to interfere with the WinRM service which just wouldn’t work, this meant I couldn’t use anything powered by powershell through the IIS - in other words I had no Exchange Management Console (EMC) or shell commands. The problem wasn’t so much emails as the DAG implementation ensured my other server took care of that with the passive database copy becoming active at the server fail, it was my primary public folder database which had the most problems, it just wouldn’t mount, so a quick scheduled reboot (during the lunch hour) and within 20 minutes (after 2 1/2 hours diagnosis and testing) I had the public folders back, this was also partially affected by the Replication service on the healthy server being stuck in a “stopping” state, I had to kill the process in task manager to fix this and manually start it.

So, what have I learnt today?
Exchange works, now leave it alone!


somewhere along the line this reboot etc enabled SSL on the pop3 service, this affected a few of our remote users, but I managed to fix that quickly enough once I knew the issue!

Exchange 2010 SP2

Microsoft have just released Exchange 2010 SP2 - a little over a month since I built both the new email servers on SP1 - how annoying is that! - anyway, after reading the new features list provided here: I am not too fussed, and will not be planning an upgrade anytime soon, maybe 6-12 months time I think…

Cent-OS Vs. Ubuntu

This is a preview into some thoughts I have regarding a full article on this subject currently I am using a number of Linux systems for various things such as web servers, email servers, network monitoring, firewall etc. I cannot really decide which Linux distro I prefer as I’m using 2x Ubuntu (Natty and Oneirc) and 3/4 Centos (5 and 6) - I find these are the best freebies but I cannot decide whether one is better than the other… time to do some testing


OK so I have to say that traditionally Ubuntu was my OS of choice; quick and easy to install, great package management and lots of good tools in the repositories…however, I have to say Cent-OS 5.7 and 6 are very powerful OSes. yum is a little fiddlier that aptitude but is just as effective and the overall feel of Cent-OS is that it is more stable and enterprise ready. I’m sure I will have more experiences as the months go on and I will post updates here…