<?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>Machine Room Archives - WardNet</title>
	<atom:link href="https://www.wardnet.co.uk/tag/machine-room/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wardnet.co.uk/tag/machine-room/</link>
	<description>Infrastructure, ERP and General Technology Blog</description>
	<lastBuildDate>Sat, 02 Jun 2012 12:42:00 +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>Machine Room Archives - WardNet</title>
	<link>https://www.wardnet.co.uk/tag/machine-room/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">63479081</site>	<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>
	</channel>
</rss>
