
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
<title>Starter Kit: Server Room Monitoring – Tinkerforge</title>

<!--<link type="text/css" rel="stylesheet" href="http://www.tinkerforge.com/static/base_tf.css" />-->
<link type="text/css" rel="stylesheet" href="http://www.tinkerforge.com/static/jquery.lightbox-0.5.css" />
<meta name="keywords" content="Tinkerforge, Open Source Hardware, Bricks, Bricklets, USB Controllable, USB Sensing, USB Controlling" />
<meta name="description" content="Easy-to-use open source hardware. Control motors and sense the environment over USB, Ethernet or Wi-Fi/WLAN with C/C++, C#, Delphi/Lazarus, Java, JavaScript, LabVIEW, Mathematica, MATLAB/Octave, Perl, PHP, Python, Ruby, Shell, Visual Basic .NET or directly over TCP/IP." />
<meta name="copyright" content="Tinkerforge GmbH" />
<!--<script type="text/javascript">document.write('<style>.noscript { display: none; }</style>');</script>-->


    
    <link rel="stylesheet" href="../../_static/documentation_tf.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="Tinkerforge" href="../../index.html" />
    <link rel="up" title="Starter Kits" href="../../Kits.html" />
    <link rel="next" title="Construction of Starter Kit: Server Room Monitoring" href="Construction.html" />
    <link rel="prev" title="Doorbell Notifier using Python" href="../HardwareHacking/DoorbellNotifier_Python.html" />

<script type="text/javascript" src="http://www.tinkerforge.com/static/jquery.lightbox-0.5.js"></script>
<script type="text/javascript">$(function() { $('#gallery a').lightBox(); });</script>
<script type="text/javascript">$(function() { $(".sphinxsidebarwrapper").filter(function() { return $.trim($(this).text()).length == 0; }).parent().hide(); });</script>


  </head>
  <body>
<div id="wrapper">
	<div id="tfcontent">
		<div class="boxContent3">


<div class="toctree">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../Getting_Started.html">Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Primer.html">Primer</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Tutorials.html">Tutorials</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../FAQ.html">FAQ</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Hardware.html">Hardware</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Hardware/Bricks/Bricks.html">Bricks</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Hardware/Bricklets/Bricklets.html">Bricklets</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Hardware/Master_Extensions/Master_Extensions.html">Master Extensions</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Hardware/Power_Supplies/Power_Supplies.html">Power Supplies</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Hardware/Accessories/Accessories.html">Accessories</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Timeline.html">Timeline</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Software.html">Software</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Brickd.html">Brick Daemon (brickd)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Brickv.html">Brick Viewer (brickv)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/API_Bindings.html">API Bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Firmwares_And_Plugins.html">Firmwares and Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Software/Device_Identifier.html">Device Identifier</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Source_Code.html">Source Code and Bug Tracking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Programming_Interface.html">Programming Interface</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="../../Kits.html">Starter Kits</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../WeatherStation/WeatherStation.html">Weather Station</a></li>
<li class="toctree-l2"><a class="reference internal" href="../HardwareHacking/HardwareHacking.html">Hardware Hacking</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="">Server Room Monitoring</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#features">Features</a></li>
<li class="toctree-l3"><a class="reference internal" href="#description">Description</a></li>
<li class="toctree-l3"><a class="reference internal" href="#technical-specifications">Technical Specifications</a></li>
<li class="toctree-l3"><a class="reference internal" href="#resources">Resources</a></li>
<li class="toctree-l3"><a class="reference internal" href="#first-tests-firmware-upgrade-and-configuration">First tests, firmware upgrade and configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#construction">Construction</a><ul>
<li class="toctree-l4"><a class="reference internal" href="Construction.html">Details</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#red-brick">RED Brick</a></li>
<li class="toctree-l3"><a class="reference internal" href="#projects">Projects</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#simple-monitoring">Simple Monitoring</a></li>
<li class="toctree-l4"><a class="reference internal" href="#server-room-monitoring-with-nagios-or-icinga">Server Room Monitoring with Nagios or Icinga</a><ul>
<li class="toctree-l5"><a class="reference internal" href="NagiosOrIcinga.html">Details</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#upload-sensor-data-to-xively">Upload Sensor Data to Xively</a><ul>
<li class="toctree-l5"><a class="reference internal" href="UploadSensorDataToXively.html">Details</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#further-enhancements">Further Enhancements</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#motion-detector-and-error-code-display">Motion Detector and Error Code Display</a><ul>
<li class="toctree-l5"><a class="reference internal" href="ExtendedNagios.html">Details</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#remote-on-off-switch">Remote On/Off Switch</a></li>
<li class="toctree-l4"><a class="reference internal" href="#monitoring-server-rack-door-with-distance-ir-bricklet">Monitoring Server Rack Door with Distance IR Bricklet</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../Blinkenlights/Blinkenlights.html">Blinkenlights</a></li>
<li class="toctree-l2"><a class="reference internal" href="../InternetOfThings/InternetOfThings.html">Internet of Things</a></li>
<li class="toctree-l2"><a class="reference internal" href="../CameraSlider/CameraSlider.html">Camera Slider</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Embedded.html">Embedded Boards</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Embedded/Raspberry_Pi.html">Raspberry Pi</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../Specifications.html">Specifications</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../Technical_Data.html">Technical Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/TCPIP.html">TCP/IP Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/Modbus.html">Modbus Protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../Low_Level_Protocols/Wireshark_Dissector.html">Wireshark Dissector</a></li>
</ul>
</li>
</ul>

</div>
<div class="breadcrumbs">
<a href="../../Kits.html">Starter Kits</a> / Server Room Monitoring
</div>



<div id="shoplink_img">
	<a href="../../../shop/kits/starter-kit-server-room-monitoring.html"><img alt="Shop" width="32" height="40" src="../../_images/Misc/cart-icon.png" /></a>
</div>
<div id="shoplink_a">
	<a href="../../../shop/kits/starter-kit-server-room-monitoring.html">In Shop</a>
</div>



    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="starter-kit-server-room-monitoring">
<span id="id1"></span><h1>Starter Kit: Server Room Monitoring<a class="headerlink" href="#starter-kit-server-room-monitoring" title="Permalink to this headline">¶</a></h1>
{% from "macros.html" import tfdocstart, tfdocimg, tfdocend %}
{{
    tfdocstart("Kits/server_room_monitoring_red_1_350.jpg",
               "Kits/server_room_monitoring_red_1_800.jpg",
               "Server Room Monitoring Kit: Front")
}}
{{
    tfdocimg("Kits/server_room_monitoring_alu_surface_100.jpg",
             "Kits/server_room_monitoring_alu_surface_800.jpg",
             "Server Room Monitoring Kit: Surface Aluminum")
}}
{{
    tfdocimg("Kits/server_room_monitoring_alu_in_hand_100.jpg",
             "Kits/server_room_monitoring_alu_in_hand_800.jpg",
             "Server Room Monitoring Kit")
}}
{{
    tfdocimg("Kits/server_room_monitoring_red_3_100.jpg",
             "Kits/server_room_monitoring_red_3_800.jpg",
             "Server Room Monitoring Kit: Back")
}}
{{
    tfdocimg("Kits/server_room_monitoring_in_rack3_100.jpg",
             "Kits/server_room_monitoring_in_rack3_800.jpg",
             "Server Room Monitoring Kit: In Rack")
}}
{{
    tfdocimg("Kits/server_room_monitoring_red_2_100.jpg",
             "Kits/server_room_monitoring_red_2_800.jpg",
             "Server Room Monitoring Kit: Front")
}}
{{
    tfdocimg("Kits/server_room_monitoring_content_100.jpg",
             "Kits/server_room_monitoring_content_800.jpg",
             "Server Room Monitoring Kit: Content")
}}
{{
    tfdocimg("Kits/server_room_monitoring_extended_100.jpg",
             "Kits/server_room_monitoring_extended_800.jpg",
             "Server Room Monitoring Kit: Extended Version")
}}
{{
    tfdocimg("Kits/server_room_monitoring_iqr_100.jpg",
             "Kits/server_room_monitoring_iqr_800.jpg",
             "Server Room Monitoring Kit: Switching Power")
}}
{{
    tfdocimg("Kits/server_room_monitoring_in_rack1_100.jpg",
             "Kits/server_room_monitoring_in_rack1_800.jpg",
             "Server Room Monitoring Kit: In Rack")
}}
{{
    tfdocimg("Kits/server_room_monitoring_in_rack2_100.jpg",
             "Kits/server_room_monitoring_in_rack2_800.jpg",
             "Server Room Monitoring Kit: In Rack")
}}
{{ tfdocend() }}<div class="section" id="features">
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Low Cost and Modular Server Room Monitoring (19&quot; Rack, 1U)</li>
<li>Expandable: Simply add extra Sensors and I/O modules as needed</li>
<li>Powered over Ethernet (<a class="reference external" href="https://en.wikipedia.org/wiki/Power_over_Ethernet">PoE</a>) or USB</li>
<li>Configuration of customized solution without programming possible</li>
<li>For Programmers: API for many programming languages:<ul>
<li><a class="reference internal" href="../../Software/API_Bindings_C.html#api-bindings-c">C/C++</a>, <a class="reference internal" href="../../Software/API_Bindings_CSharp.html#api-bindings-csharp">C#</a>, <a class="reference internal" href="../../Software/API_Bindings_Delphi.html#api-bindings-delphi">Delphi/Lazarus</a>, <a class="reference internal" href="../../Software/API_Bindings_Java.html#api-bindings-java">Java</a>, <a class="reference internal" href="../../Software/API_Bindings_JavaScript.html#api-bindings-javascript">JavaScript</a>, <a class="reference internal" href="../../Software/API_Bindings_LabVIEW.html#api-bindings-labview">LabVIEW</a>, <a class="reference internal" href="../../Software/API_Bindings_Mathematica.html#api-bindings-mathematica">Mathematica</a>, <a class="reference internal" href="../../Software/API_Bindings_MATLAB.html#api-bindings-matlab">MATLAB/Octave</a>, <a class="reference internal" href="../../Software/API_Bindings_Perl.html#api-bindings-perl">Perl</a>, <a class="reference internal" href="../../Software/API_Bindings_PHP.html#api-bindings-php">PHP</a>, <a class="reference internal" href="../../Software/API_Bindings_Python.html#api-bindings-python">Python</a>, <a class="reference internal" href="../../Software/API_Bindings_Ruby.html#api-bindings-ruby">Ruby</a>, <a class="reference internal" href="../../Software/API_Bindings_Shell.html#api-bindings-shell">Shell</a>, <a class="reference internal" href="../../Software/API_Bindings_VBNET.html#api-bindings-vbnet">Visual Basic .NET</a></li>
</ul>
</li>
<li>Open Source Soft- and Hardware with <a class="reference external" href="http://www.nagios.org/">Nagios</a> and <a class="reference external" href="https://www.icinga.org/">Icinga</a> support</li>
</ul>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The <em>Starter Kit: Server Room Monitoring</em> is an open source kit that can
monitor server room installations. The basic kit is equipped with the following
Sensors: <a class="reference internal" href="../../Hardware/Bricklets/Ambient_Light.html#ambient-light-bricklet">Ambient Light Bricklet</a>
(monitors room illumination), <a class="reference internal" href="../../Hardware/Bricklets/Humidity.html#humidity-bricklet">Humidity Bricklet</a>
(monitors humidity),
<a class="reference internal" href="../../Hardware/Bricklets/Temperature.html#temperature-bricklet">Temperature Bricklet</a> (monitors
temperature in the server rack) and a
<a class="reference internal" href="../../Hardware/Bricklets/PTC.html#ptc-bricklet">PTC Bricklet</a> with attachable Pt100 temperature sensor
probe (monitors temperature in a server).</p>
<p>The kits enclosure can be mounted directly in a 19&quot; server rack
and can be extended by other Tinkerforge
<a class="reference internal" href="../../Primer.html#primer-products">building blocks</a>, e.g. more temperature probes, motion
detector, in- or outputs (to switch computers on/off or to monitor doors),
to flexibly adapt the kit to your needs.</p>
<p>Two different applications are possible:</p>
<ol class="arabic">
<li><p class="first"><strong>Non-stand-alone monitoring</strong> (standard kit)</p>
<p>The sensors of the kit are read out via Ethernet or USB by a computer with
the offered APIs (<a class="reference internal" href="../../Software/API_Bindings_C.html#api-bindings-c">C/C++</a>, <a class="reference internal" href="../../Software/API_Bindings_CSharp.html#api-bindings-csharp">C#</a>, <a class="reference internal" href="../../Software/API_Bindings_Delphi.html#api-bindings-delphi">Delphi/Lazarus</a>, <a class="reference internal" href="../../Software/API_Bindings_Java.html#api-bindings-java">Java</a>, <a class="reference internal" href="../../Software/API_Bindings_JavaScript.html#api-bindings-javascript">JavaScript</a>, <a class="reference internal" href="../../Software/API_Bindings_LabVIEW.html#api-bindings-labview">LabVIEW</a>, <a class="reference internal" href="../../Software/API_Bindings_Mathematica.html#api-bindings-mathematica">Mathematica</a>, <a class="reference internal" href="../../Software/API_Bindings_MATLAB.html#api-bindings-matlab">MATLAB/Octave</a>, <a class="reference internal" href="../../Software/API_Bindings_Perl.html#api-bindings-perl">Perl</a>, <a class="reference internal" href="../../Software/API_Bindings_PHP.html#api-bindings-php">PHP</a>, <a class="reference internal" href="../../Software/API_Bindings_Python.html#api-bindings-python">Python</a>, <a class="reference internal" href="../../Software/API_Bindings_Ruby.html#api-bindings-ruby">Ruby</a>, <a class="reference internal" href="../../Software/API_Bindings_Shell.html#api-bindings-shell">Shell</a>, <a class="reference internal" href="../../Software/API_Bindings_VBNET.html#api-bindings-vbnet">Visual Basic .NET</a>). Individual solutions can be realized with ease.
Examples for
<a class="reference internal" href="#starter-kit-server-room-monitoring-simple-monitoring">Bash</a>,
<a class="reference internal" href="#starter-kit-server-room-monitoring-nagios-or-icinga-index">Nagios/Icinga</a> and
<a class="reference internal" href="#starter-kit-server-room-monitoring-upload-sensor-data-to-xively-index">Xively</a>
demonstrate different possibilities.</p>
</li>
<li><p class="first"><strong>Stand-alone monitoring</strong> (standard kit + RED Brick)</p>
<p>With an additional <a class="reference internal" href="../../Hardware/Bricks/RED_Brick.html#red-brick">RED Brick</a> external control
by another computer is not necessary anymore. You can configure your own
monitoring solution using just <a class="reference internal" href="../../Software/Brickv.html#brickv">Brick Viewer</a> without any
programming.</p>
<p>The value range for each sensor can be defined with sliders. It is possible
to enable email notifications for monitoring values that are out of range.
Rules can be defined for sensors that are directly connected, but also for other
Tinkerforge sensors available in the network. The defined rules
configure an instance of Nagios that runs on the RED Brick. The Nagios
web interface shows current monitoring values and currently existing problems.
More information can be found in the
<a class="reference internal" href="#starter-kit-server-room-monitoring-red-brick">RED Brick section</a>
of the Server Room Monitoring documentation.</p>
<p>Advanced users can easily modify the Nagios installation that runs on the
RED Brick to change configurations that go beyond the Brick Viewer
possibilities.</p>
</li>
</ol>
<p>The kit can be powered through
<a class="reference external" href="https://de.wikipedia.org/wiki/Power_over_Ethernet">Power over Ethernet (PoE)</a>
or USB.</p>
<p>The soft- and hardware of the kit can be modified. The casing,
except of the powder coated aluminum front panel, consists of tinker-friendly
PMMA, you can drill new holes with a wood drill. Mounting holes for
different <a class="reference internal" href="../../Primer.html#primer-bricks">Bricks</a> and
<a class="reference internal" href="../../Primer.html#primer-bricklets">Bricklets</a> are provided, by default you can
mount:</p>
<p><a class="reference internal" href="../../Hardware/Bricklets/Analog_In.html#analog-in-bricklet">Analog In Bricklet</a>,
<a class="reference internal" href="../../Hardware/Bricklets/Analog_In.html#analog-in-bricklet">Analog Out Bricklet</a>,
<a class="reference internal" href="../../Hardware/Bricklets/Industrial_Digital_In_4.html#industrial-digital-in-4-bricklet">Industrial Digital In 4 Bricklet</a>,
<a class="reference internal" href="../../Hardware/Bricklets/Industrial_Digital_Out_4.html#industrial-digital-out-4-bricklet">Industrial Digital Out 4 Bricklet</a>,
<a class="reference internal" href="../../Hardware/Bricklets/Industrial_Quad_Relay.html#industrial-quad-relay-bricklet">Industrial Quad Relay Bricklet</a>,
<a class="reference internal" href="../../Hardware/Bricklets/IO4.html#io4-bricklet">IO-4 Bricklet</a>,
<a class="reference internal" href="../../Hardware/Bricklets/Motion_Detector.html#motion-detector-bricklet">Motion Detector Bricklet</a>,
and <a class="reference internal" href="../../Hardware/Bricklets/Segment_Display_4x7.html#segment-display-4x7-bricklet">Segment Display 4x7 Bricklet</a></p>
</div>
<div class="section" id="technical-specifications">
<h2>Technical Specifications<a class="headerlink" href="#technical-specifications" title="Permalink to this headline">¶</a></h2>
<table border="1" class="docutils">
<colgroup>
<col width="35%" />
<col width="65%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Property</th>
<th class="head">Value</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>Illumination</td>
<td>0lux - 900lux in 0.1lux steps</td>
</tr>
<tr class="row-odd"><td>Ambient Temperature</td>
<td>-40°C - 85°C in 0.01°C steps</td>
</tr>
<tr class="row-even"><td>Pt100 Sensor Probe</td>
<td>-20°C - 450°C</td>
</tr>
<tr class="row-odd"><td>PTC Bricklet</td>
<td>0.03125°C (15bit) resolution</td>
</tr>
<tr class="row-even"><td>Humidity Bricklet</td>
<td>0% - 100% relative humidity</td>
</tr>
<tr class="row-odd"><td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td>Dimensions (W x D x H)</td>
<td>482 x 92 x 44mm (19.0 x 3.62 x 1.75&quot;)</td>
</tr>
<tr class="row-odd"><td>Weight</td>
<td>250g</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="resources">
<span id="starter-kit-server-room-monitoring-resources"></span><h2>Resources<a class="headerlink" href="#resources" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Server Room Monitoring Kit Case FreeCAD CAD files (<a class="reference external" href="https://github.com/Tinkerforge/server-room-monitoring/tree/master/case">Download</a>)</li>
<li>Example Source Code for <a class="reference internal" href="#starter-kit-server-room-monitoring-simple-monitoring">Simple Monitoring</a> (Download: <a class="reference external" href="https://github.com/Tinkerforge/server-room-monitoring/tree/master/simple_monitoring/check_tf_temp_simple.sh">Shell</a>)</li>
<li>Example Source Code for <a class="reference internal" href="#starter-kit-server-room-monitoring-nagios-or-icinga-index">Nagios/Icinga Plugin</a> (Download: <a class="reference external" href="https://github.com/Tinkerforge/server-room-monitoring/tree/master/nagios_icinga/check_tf_temp.py">Python</a>)</li>
<li>Example Source Code for <a class="reference internal" href="#starter-kit-server-room-monitoring-extended-nagios-index">Nagios/Icinga Extended Plugin</a> (Download: <a class="reference external" href="https://github.com/Tinkerforge/server-room-monitoring/tree/master/nagios_icinga/check_tf_temp_ext.py">Python</a>)</li>
<li>Example Source Code for <a class="reference internal" href="#starter-kit-server-room-monitoring-upload-sensor-data-to-xively-index">Upload Sensor Data to Xively</a> (Download: <a class="reference external" href="https://github.com/Tinkerforge/server-room-monitoring/tree/master/xively/server_room_monitoring.py">Python</a>)</li>
</ul>
</div>
<div class="section" id="first-tests-firmware-upgrade-and-configuration">
<h2>First tests, firmware upgrade and configuration<a class="headerlink" href="#first-tests-firmware-upgrade-and-configuration" title="Permalink to this headline">¶</a></h2>
<p>As a very first step you should try out and update your Bricks and Bricklets.</p>
<p>For that you need to install the <a class="reference internal" href="../../Software/Brickd.html#brickd-installation">Brick Daemon</a> and
the <a class="reference internal" href="../../Software/Brickv.html#brickv-installation">Brick Viewer</a>. At next you should
configure the PTC Bricklet and attach the temperature probe (2-wire).
documented <a class="reference internal" href="../../Hardware/Bricklets/PTC.html#ptc-bricklet-jumper-configuration">here</a> and
<a class="reference internal" href="../../Hardware/Bricklets/PTC.html#ptc-bricklet-connectivity">here</a>.</p>
<p>After this put the Ethernet Extension on top of the Master Brick, connect all
Bricklets to it and connect it via USB to your PC.
Afterwards use Brick Viewer to check if all firmwares are up to
date (Updates / Flashing button). If not, you can
<a class="reference internal" href="../../Software/Brickv.html#brickv-flash-firmware">update the Bricks</a> and
<a class="reference internal" href="../../Software/Brickv.html#brickv-flash-plugin">update the Bricklets</a> with the Brick
Viewer, too:</p>
<a class="reference external image-reference" href="../../_images/Kits/server_room_monitoring_update_orig.jpg"><img alt="Server Room Monitoring Hardware update in Brick Viewer" class="align-center" src="../../_images/server_room_monitoring_update_350.jpg" style="width: 350.0px; height: 175.0px;" /></a>
<p>As next step click through the tabs of the Brick Viewer to see if everything is
working correctly. Next you should configure the Ethernet Master Extension. In
our further examples we configure the hostname to &quot;ServerMonitoring&quot;
and use DHCP. To do that
click on the Master Brick tab and configure it to your needs. More information
about the configuration of the Ethernet Extension can be found
<a class="reference internal" href="../../Hardware/Master_Extensions/Ethernet_Extension.html#ethernet-configuration">here</a>.</p>
<p>After testing the hardware and configuration you can be sure that the Bricks
and Bricklets have versions that work together and that everything will work if
it is screwed together in the 19&quot; server enclosure.</p>
</div>
<div class="section" id="construction">
<h2>Construction<a class="headerlink" href="#construction" title="Permalink to this headline">¶</a></h2>
<p>The construction of the basic kit is described
<a class="reference internal" href="Construction.html#starter-kit-server-room-monitoring-construction">here</a>.</p>
<div class="toctree-wrapper compound">
</div>
</div>
<div class="section" id="red-brick">
<span id="starter-kit-server-room-monitoring-red-brick"></span><h2>RED Brick<a class="headerlink" href="#red-brick" title="Permalink to this headline">¶</a></h2>
<p>If the kit is used together with a RED Brick then Nagios running on the
RED Brick can be configured directly using Brick Viewer.</p>
<a class="reference external image-reference" href="../../_images/Screenshots/brickv_srm.jpg"><img alt="Nagios configuration in Brick Viewer" class="align-center" src="../../_images/brickv_srm_600.jpg" style="width: 600.0px; height: 375.0px;" /></a>
<p>To enable the Server Monitoring service (requires RED Brick Image &gt;= 1.6 and
Brick Viewer &gt;= 2.2.3) go to the <a class="reference internal" href="../../Hardware/Bricks/RED_Brick.html#red-brick-brickv-settings-services">services tab</a> and tick the Server Monitoring checkbox.</p>
<p>If the Server Monitoring service is enabled, it is possible to add rules.
A rule basically consists of the Bricklet type (Temperature, Ambient Light,
Humidity or PTC), its UID and a warning as well as a critical range. Just add
as many rules as you need and configure them as required.</p>
<p>You can also configure automatic email notification for each of the
warning/critical ranges. Just tick the <tt class="docutils literal"><span class="pre">Enable</span> <span class="pre">Email</span> <span class="pre">Notification</span></tt> checkbox
and add the required information.</p>
<p>Click <em>Save</em> to save the configuration on the RED Brick. You can now visit
<tt class="docutils literal"><span class="pre">http://&lt;red-brick-ip&gt;/nagios3/</span></tt> to view the current Nagios status.</p>
<a class="reference external image-reference" href="../../_images/Screenshots/nagios_srm.jpg"><img alt="Nagios webpage" class="align-center" src="../../_images/nagios_srm_600.jpg" style="width: 600.0px; height: 281.0px;" /></a>
<p>The default username:password is <tt class="docutils literal"><span class="pre">nagiosadmin</span></tt>:<tt class="docutils literal"><span class="pre">tf</span></tt>. You can change the
password through the console with:</p>
<div class="highlight-python"><div class="highlight"><pre>sudo htpasswd -c -b /etc/nagios3/htpasswd.users nagiosadmin NEWPASSWORD
</pre></div>
</div>
<p>Each of the rules will be shown as a service in Nagios. An overview over all
services is available if you click on <tt class="docutils literal"><span class="pre">Services</span></tt> in the <tt class="docutils literal"><span class="pre">Current</span> <span class="pre">Status</span></tt>
category.</p>
</div>
<div class="section" id="projects">
<span id="starter-kit-server-room-monitoring-projects"></span><h2>Projects<a class="headerlink" href="#projects" title="Permalink to this headline">¶</a></h2>
<p>There are several applications for the Starter Kit: Server Room Monitoring. In
the following we are showing some examples which can act as a starting point
for your own projects.</p>
<div class="section" id="simple-monitoring">
<span id="starter-kit-server-room-monitoring-simple-monitoring"></span><h3>Simple Monitoring<a class="headerlink" href="#simple-monitoring" title="Permalink to this headline">¶</a></h3>
<p>In this example we use the <a class="reference internal" href="../../Software/API_Bindings_Shell.html#api-bindings-shell">Shell Bindings</a> to read
out the different sensors in the kit.</p>
<p>Enumerate the Bricks and Bricklets (&quot;is all connected?&quot;):</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>tinkerforge --host ServerMonitoring enumerate
<span class="nv">uid</span><span class="o">=</span>6Dct25
connected-uid<span class="o">=</span>0
<span class="nv">position</span><span class="o">=</span>0
hardware-version<span class="o">=</span>1,0,0
firmware-version<span class="o">=</span>2,1,0
device-identifier<span class="o">=</span>master-brick
enumeration-type<span class="o">=</span>available

<span class="nv">uid</span><span class="o">=</span>fow
connected-uid<span class="o">=</span>6Dct25
<span class="nv">position</span><span class="o">=</span>a
hardware-version<span class="o">=</span>1,0,0
firmware-version<span class="o">=</span>2,0,0
device-identifier<span class="o">=</span>ptc-bricklet
enumeration-type<span class="o">=</span>available

<span class="nv">uid</span><span class="o">=</span>SCT31
connected-uid<span class="o">=</span>6Dct25
<span class="nv">position</span><span class="o">=</span>b
hardware-version<span class="o">=</span>1,1,0
firmware-version<span class="o">=</span>2,0,1
device-identifier<span class="o">=</span>temperature-bricklet
enumeration-type<span class="o">=</span>available

<span class="nv">uid</span><span class="o">=</span>ajC
connected-uid<span class="o">=</span>6Dct25
<span class="nv">position</span><span class="o">=</span>d
hardware-version<span class="o">=</span>1,1,0
firmware-version<span class="o">=</span>2,0,1
device-identifier<span class="o">=</span>ambient-light-bricklet
enumeration-type<span class="o">=</span>available
</pre></div>
</div>
<p>Read out connected sensors (adapt the UID):</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>tinkerforge --host ServerMonitoring call temperature-bricklet SCT31 get-temperature
<span class="nv">temperature</span><span class="o">=</span>2487

<span class="nv">$ </span>tinkerforge --host ServerMonitoring call ambient-light-bricklet ajC get-illuminance
<span class="nv">illuminance</span><span class="o">=</span>41

<span class="nv">$ </span>tinkerforge --host ServerMonitoring call ptc-bricklet fow get-temperature
<span class="nv">temperature</span><span class="o">=</span>2603
</pre></div>
</div>
<p>The shell bindings support the execution of additional shell commands with the
<tt class="docutils literal"><span class="pre">--execute</span></tt> option (see <a class="reference external" href="ipcon_shell_output">Shell Bindings</a> for more
information). The following script shows how to convert the returned value into
degree Celsius and how to save it in a variable for further use.</p>
<div class="highlight-bash"><div class="highlight"><pre><span class="c">#!/bin/sh</span>

<span class="nv">HOST</span><span class="o">=</span>ServerMonitoring
<span class="nv">UID</span><span class="o">=</span>SCT31

<span class="nv">temp</span><span class="o">=</span><span class="k">$(</span>tinkerforge --host <span class="nv">$HOST</span> call temperature-bricklet <span class="nv">$UID</span> get-temperature<span class="se">\</span>
       --execute <span class="s2">&quot;echo &#39;{temperature} / 100&#39; | bc | xargs printf &#39;%.2f\n&#39;&quot;</span><span class="k">)</span>
<span class="nb">echo</span> <span class="nv">$temp</span>
</pre></div>
</div>
</div>
<div class="section" id="server-room-monitoring-with-nagios-or-icinga">
<span id="starter-kit-server-room-monitoring-nagios-or-icinga-index"></span><h3>Server Room Monitoring with Nagios or Icinga<a class="headerlink" href="#server-room-monitoring-with-nagios-or-icinga" title="Permalink to this headline">¶</a></h3>
<p><a class="reference external" href="https://www.icinga.org/">Icinga</a> and <a class="reference external" href="http://www.nagios.org/">Nagios</a>
are computer system monitoring tools. Icinga is a fork of Nagios and is
said to be backward compatible to Nagios. In the following examples we are
referring to the Nagios API to be also compatible with Icinga.</p>
<p>These monitoring tools use plugins, instantiated as services to
monitor processor load, memory utilization, specific software processes or
physical values like temperature.</p>
<p>In this example we write our own plugin to use the kits hardware for ambient
temperature measuring. With a few modifications you can use the plugin to
support other Tinkerforge hardware modules and create the physical monitoring
you need.</p>
<a class="reference external image-reference" href="../../_images/Kits/server_room_monitoring_icinga_screenshot_orig.jpg"><img alt="Icinga Screenshot" class="align-center" src="../../_images/server_room_monitoring_icinga_screenshot_350.jpg" style="width: 350.0px; height: 133.0px;" /></a>
<p>Find the full project description <a class="reference internal" href="NagiosOrIcinga.html#starter-kit-server-room-monitoring-nagios-or-icinga">here</a>.</p>
<div class="toctree-wrapper compound">
</div>
<p>The section about <a class="reference internal" href="#starter-kit-server-room-monitoring-further-enhancements">further enhancements</a> lists more
Nagios/Icinga examples.</p>
</div>
<div class="section" id="upload-sensor-data-to-xively">
<span id="starter-kit-server-room-monitoring-upload-sensor-data-to-xively-index"></span><h3>Upload Sensor Data to Xively<a class="headerlink" href="#upload-sensor-data-to-xively" title="Permalink to this headline">¶</a></h3>
<p><a class="reference external" href="https://xively.com/">Xively</a> is a service that provides the possibility to
analyze and visualize the &quot;Internet of Things&quot;. It can be used to interconnect
different devices over the Internet and can store a history of
measured values and can display it with pretty graphs.</p>
<a class="reference external image-reference" href="../../_images/Kits/server_room_monitoring_xively_orig.jpg"><img alt="Xively datastream configuration" class="align-center" src="../../_images/server_room_monitoring_xively_350.jpg" style="width: 350.0px; height: 414.0px;" /></a>
<p>The full project description can be found <a class="reference internal" href="UploadSensorDataToXively.html#starter-kit-server-room-monitoring-upload-sensor-data-to-xively">here</a>.</p>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
<div class="section" id="further-enhancements">
<span id="starter-kit-server-room-monitoring-further-enhancements"></span><h2>Further Enhancements<a class="headerlink" href="#further-enhancements" title="Permalink to this headline">¶</a></h2>
<p>If you have modded, extended or improved the kit
in any way and you have published your results on our
<a class="reference external" href="http://www.tinkerunity.org/wiki/">Wiki</a>, on your blog or similar:
Please give us a notice. We would love to add a link to your project here!</p>
<div class="section" id="motion-detector-and-error-code-display">
<span id="starter-kit-server-room-monitoring-extended-nagios-index"></span><h3>Motion Detector and Error Code Display<a class="headerlink" href="#motion-detector-and-error-code-display" title="Permalink to this headline">¶</a></h3>
<p>The casing has already the necessary cut-outs for a <a class="reference internal" href="../../Hardware/Bricklets/Motion_Detector.html#motion-detector-bricklet">Motion Detector Bricklet</a>
and a <a class="reference internal" href="../../Hardware/Bricklets/Segment_Display_4x7.html#segment-display-4x7-bricklet">Segment Display 4x7 Bricklet</a>. Use a Motion
Detector Bricklet to detect motion in your server room. An additional Segment
Display 4x7 Bricklet can be used to show error code information on the case.</p>
<p>The full project description can be found
<a class="reference internal" href="ExtendedNagios.html#starter-kit-server-room-monitoring-extended-nagios">here</a>.</p>
<a class="reference external image-reference" href="../../_images/Kits/server_room_monitoring_extended_1000.jpg"><img alt="Extended version of kit" class="align-center" src="../../_images/server_room_monitoring_extended_350.jpg" style="width: 350.0px; height: 200.0px;" /></a>
<div class="toctree-wrapper compound">
</div>
</div>
<div class="section" id="remote-on-off-switch">
<h3>Remote On/Off Switch<a class="headerlink" href="#remote-on-off-switch" title="Permalink to this headline">¶</a></h3>
<p>Use Industrial Quad Relay to switch computers on or off remotely.
You can use the previous examples to modify them to your needs.
The wiring is really simple, you only have to bypass the on/off switch
of the computer with one of the relays of the Industrial Quad Relay Bricklet.
A tutorial how a switch can be bypassed can be found at the
<a class="reference internal" href="../HardwareHacking/ForBeginners.html#starter-kit-hardware-hacking-for-beginners">Hardware Hacking for Beginners Tutorial</a>.</p>
<a class="reference external image-reference" href="../../_images/Kits/server_room_monitoring_iqr_1000.jpg"><img alt="Kit with Industrial Quad Relay Bricklet" class="align-center" src="../../_images/server_room_monitoring_iqr_350.jpg" style="width: 350.0px; height: 255.0px;" /></a>
</div>
<div class="section" id="monitoring-server-rack-door-with-distance-ir-bricklet">
<h3>Monitoring Server Rack Door with Distance IR Bricklet<a class="headerlink" href="#monitoring-server-rack-door-with-distance-ir-bricklet" title="Permalink to this headline">¶</a></h3>
<p>Martin Seener developed a check for Nagios that uses a Distance IR Bricklet to
detect if the door of a server rack was opened. The Distance IR Bricklet is
mounted inside the server rack and measures the distance towards the closed
door. If the distance changes significantly then the door was opened.</p>
<p>To get a proper threshold the standard deviation of the distance measurements
of the Distance IR Bricklets is calculated over a longer time. Martin Seener
included a script for this task.</p>
<p>This check is the first one in a <a class="reference external" href="https://github.com/martinseener/tinkerforge-nagios-checks">collection</a> of Nagios checks
for Tinkerforge.</p>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
		<div id="tf_license">
			<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
				<img alt="Creative Commons Licence" width="88" height="31" style="border-width:0" src="/static/images/cc_license_logo.png" />
			</a>
			The content of this page is licensed under
			<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution 3.0 Unported License</a>.
		</div>
		</div>
	</div>
</div>

  </body>
</html>