<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Archives - WardNet</title>
	<atom:link href="https://www.wardnet.co.uk/category/linux-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wardnet.co.uk/category/linux-2/</link>
	<description>Infrastructure, ERP and General Technology Blog</description>
	<lastBuildDate>Fri, 24 Nov 2017 14:19:53 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2026/01/wp-1767387074640.jpg?fit=32%2C32&#038;ssl=1</url>
	<title>Linux Archives - WardNet</title>
	<link>https://www.wardnet.co.uk/category/linux-2/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">63479081</site>	<item>
		<title>Virtual Home Server</title>
		<link>https://www.wardnet.co.uk/virtual-home-server/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Fri, 24 Nov 2017 13:02:12 +0000</pubDate>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[VMWare]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=455</guid>

					<description><![CDATA[<p>As one of those people who loves to be running the latest tech in both my home and professional lives</p>
<p><a href="https://www.wardnet.co.uk/virtual-home-server/">Virtual Home Server</a></p>
]]></description>
										<content:encoded><![CDATA[<p>As one of those people who loves to be running the latest tech in both my home and professional lives it&#8217;s critical that I build the correct infrastructure in order to achieve that.</p>
<p>At home I recently obtained a 2014 spec Dell server, which had a fair bit of memory and storage, certainly for what was to become the hub of my home operations!</p>
<p>In the last 2 months I have been building the server up, utilising all the latest platforms I can get my hands on.. VMWare ESX 6.5, Windows 10/2016, Ubuntu 16.04 etc.</p>
<p>I now have 8 VMs, across 2 datastores having upgraded all firmware possible and playing around with various settings to balance performance and noise (it&#8217;s in the spare room)</p>
<p>Here&#8217;s the outcome of that work:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2017/11/112417_1300_VirtualHome1.png?w=810&#038;ssl=1" alt=""></p>
<p>This first image shows my ESX 6.5 HTML5 based landing page (one of easiest to use web admin tools I&#8217;ve seen), you&#8217;ll note the 128GB RAM, Dual 2.9GHz CPUs and 8.5TB storage &#8211; perfect for running media servers as well as testing platforms for my crazy ideas!</p>
<p>Drilling down into the VMs I have built you&#8217;ll see a mixture of OSes and things I&#8217;m testing:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2017/11/112417_1300_VirtualHome2.png?w=810&#038;ssl=1" alt=""></p>
<p>I was clever enough (somehow) to make my FTP server web facing, it&#8217;s where I store all the freebie utility style programs that I use across many systems, It allows me to use it instead of having to carry a USB around all the time!</p>
<p>Plex is the big one, over 3TB assigned to it for all the media we have at home, we can play it across all our devices, such as the SmartTV, Amazon Fire Stick, XboxOne etc.</p>
<p>What I&#8217;ve not yet got to grips with is the VMNetwork side of things, eventually I&#8217;d like to VLAN off some of the VMs to do some sandbox style testing with various OSes, maybe get back into Linux and re-learn hardening techniques etc, just need the time!</p>
<p><a href="https://www.wardnet.co.uk/virtual-home-server/">Virtual Home Server</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">455</post-id>	</item>
		<item>
		<title>Installing Oracle Linux 6 &#8211; Video</title>
		<link>https://www.wardnet.co.uk/install-oracle-linux-6/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 30 Mar 2015 12:11:56 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Guides]]></category>
		<category><![CDATA[Oracle Linux]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[Virtual Box]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=346</guid>

					<description><![CDATA[<p>My latest Virtual Box install video, this time Oracle Linux 6</p>
<p><a href="https://www.wardnet.co.uk/install-oracle-linux-6/">Installing Oracle Linux 6 &#8211; Video</a></p>
]]></description>
										<content:encoded><![CDATA[<div style="width: 640px;" class="wp-video"><video class="wp-video-shortcode" id="video-346-1" width="640" height="360" preload="metadata" controls="controls"><source type="video/webm" src="http://www.wardnet.co.uk/wp-content/uploads/2015/03/OracleLinux6.webm?_=1" /><a href="http://www.wardnet.co.uk/wp-content/uploads/2015/03/OracleLinux6.webm">http://www.wardnet.co.uk/wp-content/uploads/2015/03/OracleLinux6.webm</a></video></div>
<p>My latest Virtual Box install video, this time Oracle Linux 6</p>
<p><a href="https://www.wardnet.co.uk/install-oracle-linux-6/">Installing Oracle Linux 6 &#8211; Video</a></p>
]]></content:encoded>
					
		
		<enclosure url="http://www.wardnet.co.uk/wp-content/uploads/2015/03/OracleLinux6.webm" length="197514823" type="video/webm" />

		<post-id xmlns="com-wordpress:feed-additions:1">346</post-id>	</item>
		<item>
		<title>Centos 7 First Install &#8211; Video</title>
		<link>https://www.wardnet.co.uk/centos-7-first-install-video/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 30 Mar 2015 11:25:14 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Guides]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=342</guid>

					<description><![CDATA[<p>I made this a while ago when Centos 7 was first release, it&#8217;s my first attempt at recording a VirtualBox</p>
<p><a href="https://www.wardnet.co.uk/centos-7-first-install-video/">Centos 7 First Install &#8211; Video</a></p>
]]></description>
										<content:encoded><![CDATA[<div style="width: 640px;" class="wp-video"><video class="wp-video-shortcode" id="video-342-2" width="640" height="360" preload="metadata" controls="controls"><source type="video/webm" src="http://www.wardnet.co.uk/wp-content/uploads/2015/03/Centos7Install.webm?_=2" /><a href="http://www.wardnet.co.uk/wp-content/uploads/2015/03/Centos7Install.webm">http://www.wardnet.co.uk/wp-content/uploads/2015/03/Centos7Install.webm</a></video></div>
<p>I made this a while ago when Centos 7 was first release, it&#8217;s my first attempt at recording a VirtualBox session</p>
<p><a href="https://www.wardnet.co.uk/centos-7-first-install-video/">Centos 7 First Install &#8211; Video</a></p>
]]></content:encoded>
					
		
		<enclosure url="http://www.wardnet.co.uk/wp-content/uploads/2015/03/Centos7Install.webm" length="28277592" type="video/webm" />

		<post-id xmlns="com-wordpress:feed-additions:1">342</post-id>	</item>
		<item>
		<title>Linux Virus Scan &#8211; Daily Email Script</title>
		<link>https://www.wardnet.co.uk/linux-virus-scan-daily-email-script/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Fri, 24 May 2013 08:06:31 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[email script]]></category>
		<category><![CDATA[email server]]></category>
		<category><![CDATA[FOUND]]></category>
		<category><![CDATA[GREP]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Linux Virus Scan]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[Scan Results]]></category>
		<category><![CDATA[virus scan]]></category>
		<category><![CDATA[virus scanners]]></category>
		<category><![CDATA[viruses]]></category>
		<category><![CDATA[web directories]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=204</guid>

					<description><![CDATA[<p>Yes, that&#8217;s right, Linux can get viruses too, in fact they can harbour windows based viruses if the system is</p>
<p><a href="https://www.wardnet.co.uk/linux-virus-scan-daily-email-script/">Linux Virus Scan &#8211; Daily Email Script</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Yes, that&#8217;s right, Linux can get viruses too, in fact they can harbour windows based viruses if the system is used as a web and email server! Something I&#8217;ve been becoming more and more familiar with. So, our systems already used ClamAV one of the more popular Linux based virus scanners. But whilst it runs a scan on incoming emails etc. It doesn&#8217;t really give me a nice visual output (no GUI). My solution? Automated daily scan with emailed results&#8230;</p>
<p><span style="font-family: 'courier new', courier; font-size: 12px;">clamscan -r /var/www &gt; /root/scanresults.txt</span></p>
<p><span style="font-family: 'courier new', courier; font-size: 12px;">cat /root/scanresults.txt | mail -s &#8221; Scan Results&#8221; hello@example.com</span></p>
<p><span style="font-family: 'courier new', courier; font-size: 12px;"><em id="__mceDel">cat /root/scanresults.txt | grep FOUND | mail -s &#8220;Viruses Found&#8221; hello@example.com</em></span></p>
<p>So what does this do?</p>
<p>well, it scans the web directories (recursively) for any viruses that are listed in the virus DB (updated twice daily) &#8211; it then puts all the results into a text file. this text file is then read into an email command which is sent to the hello@example.com email address.</p>
<p>However, this isn&#8217;t much use as there are thousands of files and directories, what I really want to know is whether viruses were found&#8230; the solution to this is GREP out the value &#8220;FOUND&#8221; which is appended to the file name if a virus is found to be in it &#8211; this is then read into the same email command as before leaving me a nice list of only the files found with viruses!</p>
<p>I love a nice quick and easy script &#8211; I used cron tab to run this at 00:05 and 12:05 every day!</p>
<p><a href="https://www.wardnet.co.uk/linux-virus-scan-daily-email-script/">Linux Virus Scan &#8211; Daily Email Script</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">204</post-id>	</item>
		<item>
		<title>How to become a web host almost overnight&#8230;</title>
		<link>https://www.wardnet.co.uk/how-to-become-a-web-host-almost-overnight/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Sat, 08 Sep 2012 16:07:07 +0000</pubDate>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[environment]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=102</guid>

					<description><![CDATA[<p>I&#8217;m thinking the title of this post may one day be a best-selling e-book written by myself. The word &#8220;overnight&#8221;</p>
<p><a href="https://www.wardnet.co.uk/how-to-become-a-web-host-almost-overnight/">How to become a web host almost overnight&#8230;</a></p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m thinking the title of this post may one day be a best-selling e-book written by myself. The word &#8220;overnight&#8221; is a slight exaggeration, however since the second week of August, leading up to the present point in time, I have been working tirelessly (yes even through the night and over a weekend!), to migrate a web design/ hosting company&#8217;s complete hosting solution to local premises, from the over-hyped cloud.</p>
<p>Now, this all sounds very exciting, and it is (for me), however the complexity of moving from a hosted server environment (thanks to lcn.com) to a more localised, manageable system is enormous. Imagine turning up to a new job, and on day one the boss says, here&#8217;s your predecessor&#8217;s system, there&#8217;s no documentation on how to do your job just log in and figure out what you&#8217;re going to be doing without much help from those around you as they&#8217;re all too busy; well that&#8217;s a slightly over-hyped version of the situation here. Inheriting a system without documentation is one thing, gradually by pooling all the resources you can find you can map it out into your own terms and understanding &#8211; and can gain a good basic overview, then with more time (if available) you learn all the in depth aspects of the system and can sometimes if lucky, rewrite certain elements to your own language and document that &#8211; this is in essence reverse engineering, and a good skill to have as a system admin.</p>
<p>The second problem, once system knowledge is gained is, how to go about migrating from a hosted environment to one you host yourself. This sounds easy &#8211; in short it&#8217;s not! With over 60 customer&#8217;s websites and emails hosted, moving this is inevitably going to cause some disruption and downtime, this can be managed with good customer service, however what happens if certain things don&#8217;t work properly on the new system, or after a reboot not all services come back, or you don&#8217;t know the password for the user that runs a specific task? Yes, I have experienced all these and more. In fact, this whole challenge has stretched my skills and knowledge to the limit, and I&#8217;m sure once the new systems are fully live and more customers come on-board, I will look back and be grateful for having this experience.</p>
<p>Migration in this case hasn&#8217;t been awful, because, even though the servers are dedicated server environments, the actual hosting servers are virtualised within those, and with a little Linux/ virtualisation magic (and a weekend window of 2 hours), images were cloned and copied to the new servers. Cloning did mean taking all systems down temporarily, but I was impressed with the speed of cloning 100Gb images (under 45mins) &#8211; and with 100Mbps Fibre at my end the download of the clone wasn&#8217;t too bad either.</p>
<p>So, now I have the clones what do I do with them &#8211; well assuming my local servers are configured correctly to host the virtual images I can simply turn them on, change the IP addresses, do my usual Firewall magic (god bless WatchGuard!), and away we go&#8230; Could it really be that simple, well&#8230; Yes, surprisingly. In my head I thought &#8220;turn it on, change the ip addresses, reboot, test&#8221; &#8211; And wuite simply this was the case. So now I have a virtualised hosting environment, running on much more powerful equipment of which I have full control. Sorted.</p>
<p>Well, almost&#8230; What about the websites themselves, I may have the data, and even the emails we host, but what about the pointers to those sites, where do nameservers point, who has control&#8230;Bugger! &#8211; The first panic/ minor snag was realising we dont manage the domains for all the customers, and after investigation, we only manage around half (usually where they have .co.uk and .com and we set up one but they did the other!) &#8211; OK not to worry, should we just do it in one hit and modify the nameservers, well we could, but I don&#8217;t like the risk, but I do like control, so we decided to manually switch one domain at a time, allownig to test each one individually and ensure customer satisfaction is still at the highest levels. &#8211; This is a slow process, especially where back-end DBs and emails are still being modified all the time, as I have a new system not being updated whilst the old is (and vice-versa) so a little manual intervention is required to copy down data from the &#8220;old&#8221; to the &#8220;new&#8221;, but again this gives me control so it&#8217;s all good.</p>
<p>Now, it&#8217;s just a case of going through the list of domains (all 132) one by one and modifying nameservers, and informing customers to do the same where they have the control. I like the personal touch that&#8217;s possible with this many customers, but dread what we would have to plan if we did this again with 10x the numbers (which is always possible)&#8230;</p>
<p>&nbsp;</p>
<p>Thanks for reading my longest post ever, for more information on this ongoing project and the tools and skills required please feel free to contact me at: <a href="mailto:jaward916@gmail.com">jaward916@gmail.com</a></p>
<p><a href="https://www.wardnet.co.uk/how-to-become-a-web-host-almost-overnight/">How to become a web host almost overnight&#8230;</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">102</post-id>	</item>
		<item>
		<title>Nagios Notification Script</title>
		<link>https://www.wardnet.co.uk/nagios-notification-script/</link>
					<comments>https://www.wardnet.co.uk/nagios-notification-script/#comments</comments>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Wed, 01 Feb 2012 16:16:44 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[nagios]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=48</guid>

					<description><![CDATA[<p>Originally posted at johnnyward.co.uk (http://www.johnnyward.co.uk/nagios-notification-script/) I decided to write my own script for Nagios to send emails to external addresses</p>
<p><a href="https://www.wardnet.co.uk/nagios-notification-script/">Nagios Notification Script</a></p>
]]></description>
										<content:encoded><![CDATA[<p><em>Originally posted at johnnyward.co.uk (<a title="Orignal Post" href="http://www.johnnyward.co.uk/nagios-notification-script/">http://www.johnnyward.co.uk/nagios-notification-script/</a>)</em></p>
<p>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!)</p>
<p>my exchangescript.sh file is called by a command created in the nagios command.cfg file as below:<br />
<span style="font-family: courier new,courier; color: #008000;">#Exchange notifications</span><br />
<span style="font-family: courier new,courier;"> define command{</span><br />
<span style="font-family: courier new,courier;"> command_name notify_ex_mail</span><br />
<span style="font-family: courier new,courier;"> command_line sh /etc/nagios3/exchangescript.sh &#8220;$NOTIFICATIONTYPE$&#8221; &#8220;$SERVICEDESC$&#8221; &#8220;$HOSTALIAS$&#8221; &#8220;$HOSTADDRESS$&#8221; &#8220;$SERVICESTATE$&#8221; &#8220;$LONGDATETIME$&#8221; &#8220;$SERVICEOUTPUT$&#8221; &#8220;$CONTACTEMAIL$&#8221;</span><br />
<span style="font-family: courier new,courier;"> }</span></p>
<p>The &#8220;$PARAMETER$&#8221; inputs are created by nagios and therefore would not make sense outside of a Nagios config file.</p>
<p>my exchangescript.sh file is here:<br />
<span style="font-family: courier new,courier; color: #008000;">#!/bin/bash</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## Send mail notification when nagios detects a problem &#8211; manual overide from Nagios defaults ##</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## Script By Jonathan Ward 26/09/2011 ##</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Parameter List as defined in /etc/nagios3/commands.cfg</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $1 = Notification Type e.g. &#8220;PROBLEM&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $2 = Service Description e.g. &#8220;Explorer.exe&#8221; OR &#8220;SMTP Status&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $3 = Host Alias e.g &#8220;MyExchangeServer&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $4 = Host Address e.g. &#8220;192.168.1.1&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $5 = Service State e.g. &#8220;CRITICAL&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $6 = Long Date and Time e.g. &#8220;Mon Sept 26 16:07:21 BST 2011&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## $7 = Service Output</span><br />
<span style="font-family: courier new,courier; color: #008000;"> # #$8 = Contact Email</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Set Message Subject &#8211; spaces won&#8217;t work?</span><br />
<span style="font-family: courier new,courier;"> msgsubject=&#8217;Exchange Issue&#8217;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Set Email Addresses with spaces not commas etc.</span><br />
<span style="font-family: courier new,courier;"> msgto=&#8221;EMAIL ADDRESSES GO HERE&#8221;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Set Message Body</span><br />
<span style="font-family: courier new,courier;"> msgbody=&#8221;Nagios is reporting $1 on $3 \n \nService $2 State is: $5 \n \nTime Reported: $6&#8243;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Create subject in file /etc/nagios3/mailbody</span><br />
<span style="font-family: courier new,courier; color: #008000;"> #echo -e &#8220;$msgbody&#8221; &gt; /etc/nagios3/mailbody</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Command to send email with subject and body</span><br />
<span style="font-family: courier new,courier; color: #008000;"> #mail -s &#8220;$msgsubject&#8221; &#8220;$msgto&#8221; &lt; /etc/nagios3/mailbody #Using external file as body</span><br />
<span style="font-family: courier new,courier;"> echo -e &#8220;&#8216;$msgbody'&#8221; | mail -s &#8220;$msgsubject&#8221; &#8220;$msgto&#8221; <span style="color: #008000;">#using internal echo as body &#8211; prints -e in emails???</span></span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##delete body file for next run</span><br />
<span style="font-family: courier new,courier; color: #008000;"> #rm -f /etc/nagios3/mailbody</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##Debugging lines go here&#8230;</span><br />
<span style="font-family: courier new,courier; color: #008000;"> # echo -e &#8220;$1 \n$2 \n$3 \n$4 \n$5 \n$6 \n$7 \n$8&#8221; &gt; /root/scriptdebug #Copies values of parameters on seperate lines in /root/scriptdebug file</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##TO TEST SCRIPT##</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## /etc/nagios3/exchangescript.sh &#8220;notifcation type&#8221; &#8220;service description&#8221; &#8220;host alias&#8221; &#8220;host address&#8221; &#8220;service state&#8221; &#8220;long date time&#8221; &#8220;service output&#8221; &#8220;contact email&#8221;</span></p>
<p><a href="https://www.wardnet.co.uk/nagios-notification-script/">Nagios Notification Script</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wardnet.co.uk/nagios-notification-script/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">48</post-id>	</item>
		<item>
		<title>Linux Script for monitoring Machine Room temperatures</title>
		<link>https://www.wardnet.co.uk/linux-script-for-monitoring-machine-room-temperatures/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Wed, 01 Feb 2012 15:20:58 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[jonathan ward]]></category>
		<category><![CDATA[Machine Room]]></category>
		<category><![CDATA[Room Temperatures]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=45</guid>

					<description><![CDATA[<p>Following on from one of my first projects at BMS, where I installed a server monitoring solution called Nagios, I</p>
<p><a href="https://www.wardnet.co.uk/linux-script-for-monitoring-machine-room-temperatures/">Linux Script for monitoring Machine Room temperatures</a></p>
]]></description>
										<content:encoded><![CDATA[<p>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 <a title="Nagios Notification Script" href="http://wardnet.co.uk/nagios-notification-script/">here</a>.</p>
<p>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:</p>
<p><span style="font-family: courier new,courier; color: #008000;">#!/bin/bash</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ##ThermoMail.sh</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## Send mail notification of Machine Room Temperatures##</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ## Script By Jonathan Ward 01/02/2012##</span></p>
<p><span style="font-family: courier new,courier; color: #008000;">##./gettemp.sh (was spereate script)##</span><br />
<span style="font-family: courier new,courier; color: #008000;"> rm /root/temperatures</span><br />
<span style="font-family: courier new,courier; color: #000000;"> echo -e &#8220;Machine Room 1 status: &#8221; &gt; /root/temperatures</span><br />
<span style="font-family: courier new,courier; color: #000000;"> /usr/lib/nagios/plugins/check_openmanage -H <span style="color: #0000ff;">[ipaddress]</span> &#8211;only temp &gt;&gt; /root/temperatures</span><br />
<span style="font-family: courier new,courier; color: #000000;"> echo -e &#8220;\n\nMachine Room 2 status: &#8221; &gt;&gt; /root/temperatures</span><br />
<span style="font-family: courier new,courier; color: #000000;"> /usr/lib/nagios/plugins/check_openmanage -H <span style="color: #0000ff;">[ipaddress]</span> &#8211;only temp &gt;&gt; /root/temperatures</span><br />
<span style="font-family: courier new,courier; color: #008000;"> ####</span></p>
<p><span style="font-family: courier new,courier; color: #008000;">##Set Message Subject</span><br />
<span style="font-family: courier new,courier; color: #000000;"> msgsubject=&#8217;Machine Room Temperatures&#8217;</span></p>
<p><span style="font-family: courier new,courier; color: #008000;">##Set Email Addresses with spaces not commas etc.</span><br />
<span style="font-family: courier new,courier; color: #000000;"> msgto=&#8221;<span style="color: #0000ff;">mail@example.com</span>&#8220;</span></p>
<p><span style="font-family: courier new,courier; color: #008000;">##Command to send email with subject and body</span><br />
<span style="font-family: courier new,courier; color: #000000;"> mail -s &#8220;$msgsubject&#8221; &#8220;$msgto&#8221; &lt; /root/temperatures</span></p>
<p><span style="font-family: courier new,courier; color: #008000;">##DEBUGGING LINES</span><br />
<span style="font-family: courier new,courier; color: #008000;"> #echo -e &#8220;$msgbody&#8221; &gt; /root/mailtest</span></p>
<p>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&#8230;</p>
<p>&nbsp;</p>
<p>The output in the email looks like this:</p>
<p><a href="https://i0.wp.com/wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png"><img data-recalc-dims="1" fetchpriority="high" decoding="async" data-attachment-id="49" data-permalink="https://www.wardnet.co.uk/linux-script-for-monitoring-machine-room-temperatures/thermomailscreen1/" data-orig-file="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png?fit=717%2C575&amp;ssl=1" data-orig-size="717,575" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Mail Output" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png?fit=300%2C240&amp;ssl=1" data-large-file="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png?fit=717%2C575&amp;ssl=1" class="alignnone size-medium wp-image-49" title="Mail Output" src="https://i0.wp.com/wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1-300x240.png?resize=300%2C240" alt="" width="300" height="240" srcset="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png?resize=300%2C240&amp;ssl=1 300w, https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png?resize=150%2C120&amp;ssl=1 150w, https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2012/02/ThermoMailscreen1.png?w=717&amp;ssl=1 717w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="https://www.wardnet.co.uk/linux-script-for-monitoring-machine-room-temperatures/">Linux Script for monitoring Machine Room temperatures</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">45</post-id>	</item>
		<item>
		<title>Cent-OS Vs. Ubuntu</title>
		<link>https://www.wardnet.co.uk/centos-vs-ubuntu/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 28 Nov 2011 13:22:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=12</guid>

					<description><![CDATA[<p>This is a preview into some thoughts I have regarding a full article on this subject currently I am using</p>
<p><a href="https://www.wardnet.co.uk/centos-vs-ubuntu/">Cent-OS Vs. Ubuntu</a></p>
]]></description>
										<content:encoded><![CDATA[<p>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&#8217;m using 2x Ubuntu (Natty and Oneirc) and 3/4 Centos (5 and 6) &#8211; I find these are the best freebies but I cannot decide whether one is better than the other&#8230; time to do some testing</p>
<p>&nbsp;</p>
<p>UPDATE:</p>
<p>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&#8230;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&#8217;m sure I will have more experiences as the months go on and I will post updates here&#8230;</p>
<p><a href="https://www.wardnet.co.uk/centos-vs-ubuntu/">Cent-OS Vs. Ubuntu</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">12</post-id>	</item>
	</channel>
</rss>
