<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">Warmfusion.co.uk</title>
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator>
<link rel="self" type="application/atom+xml" href="http://warmfusion.co.uk/feed.xml" />
<link rel="alternate" type="text/html" href="http://warmfusion.co.uk" />
<updated>2025-07-19T16:55:25+01:00</updated>
<id>http://warmfusion.co.uk/</id>
<author>
  <name>Toby Jackson</name>
  <uri>http://warmfusion.co.uk/</uri>
  <email>toby.jackson@warmfusion.co.uk</email>
</author>


<entry>
  <title type="html"><![CDATA[NFS vs iSCSI - My failed experiment]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2025-07/nfs-iscsi-failures/"/>
  <id>http://warmfusion.co.uk/2025-07/nfs-iscsi-failures</id>
  <published>2025-07-19T00:00:00+01:00</published>
  <updated>2025-07-19T00:00:00+01:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;h1 id=&quot;nfs-vs-iscsi-in-a-homelab-a-performance-and-setup-experiment&quot;&gt;NFS vs iSCSI in a Homelab: A Performance and Setup Experiment&lt;/h1&gt;

&lt;p&gt;This post documents my experience comparing &lt;strong&gt;NFS&lt;/strong&gt; and &lt;strong&gt;iSCSI&lt;/strong&gt; storage protocols in my homelab setup.&lt;/p&gt;

&lt;p&gt;During testing, I’d realised that my NAS was only ever able to provide 20MB/s throughput over the NFS, which significantly bottlenecked performance for my media management and data processing experiments.&lt;/p&gt;

&lt;p&gt;This doc describes my (failed) attemps to find which protocol would offer better performance and manageability for media storage.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;TLDR: NFS ~25MB/s, isci ~8MB/s with CPU spikes on NAS. NFS sucks, but its &lt;em&gt;ok&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;-test-environment&quot;&gt;🧪 Test Environment&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Client&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Debian Linux (bare-metal) HP-Gen8 MicroServer (16G RAM, Intel Xeon E3-1230 V2)&lt;/li&gt;
  &lt;li&gt;Connected directly to NAS with a dedicated 1gbit/s path
    &lt;ul&gt;
      &lt;li&gt;Jumbo frames enabled (MTU 9000) and verified&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NAS&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Asustor AS6706T&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;6x 3TB ST33000650NS CMR SeaGate enterprise NAS drives&lt;/li&gt;
      &lt;li&gt;2x 1TB CT1000P3PSSD8 Crucial M.2 SSD cache drives&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Supports NFS and iSCSI&lt;/li&gt;
  &lt;li&gt;LUN-backed storage volume (~4TB)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;-nfs-setup-and-performance&quot;&gt;📁 NFS Setup and Performance&lt;/h2&gt;

&lt;h3 id=&quot;systemd-mount-unit&quot;&gt;Systemd Mount Unit&lt;/h3&gt;

&lt;div class=&quot;language-ini highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nn&quot;&gt;[Unit]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;NFS Mount to Media&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;After&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;network.target&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Mount]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;What&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;192.168.2.15:/volume1/Media&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;/mnt/nfs/media/volume1/Media&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;nfs&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;_netdev,auto&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Install]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;WantedBy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;multi-user.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Viewing the output of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mount&lt;/code&gt; shows that my Debian OS defaulted the NFS mount with the following options;&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;vers&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;4.2,rsize&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1048576,wsize&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1048576,hard,timeo&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;600,retrans&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;2,_netdev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;fio-test-command&quot;&gt;FIO Test Command&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;The Flexible I/O (FIO) tester is a versatile tool for measuring storage performance. It allows simulating various I/O patterns and workloads to evaluate how storage systems perform under different conditions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this test, I used FIO to generate a mixed read/write workload with 128KB block sizes, which is somewhat representative of media file access patterns.&lt;/p&gt;

&lt;p&gt;The test runs for 60 seconds using asynchronous I/O (libaio) with a queue depth of 32 to measure sustainable throughput.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;fio &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;nfs-test &lt;span class=&quot;nt&quot;&gt;--directory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/mnt/nfs/media/volume1/Media &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;--size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1G &lt;span class=&quot;nt&quot;&gt;--readwrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;rw &lt;span class=&quot;nt&quot;&gt;--bs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;128k &lt;span class=&quot;nt&quot;&gt;--ioengine&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;libaio &lt;span class=&quot;nt&quot;&gt;--iodepth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;32 &lt;span class=&quot;nt&quot;&gt;--runtime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;60 &lt;span class=&quot;nt&quot;&gt;--time_based&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The results however, we’re not promising, and aligned with my observed speeds…&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Run status group 0 (all jobs):
   READ: bw=24.7MiB/s (25.9MB/s), 24.7MiB/s-24.7MiB/s (25.9MB/s-25.9MB/s), io=1480MiB (1552MB), run=60019-60019msec
   WRITE: bw=24.7MiB/s (25.9MB/s), 24.7MiB/s-24.7MiB/s (25.9MB/s-25.9MB/s), io=1482MiB (1554MB), run=60019-60019msec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So 25MB/s for both Read and Write… rubbish.&lt;/p&gt;

&lt;h3 id=&quot;netcat-bandwidth-test&quot;&gt;Netcat Bandwidth Test&lt;/h3&gt;

&lt;p&gt;As those numbers were suspiciously similar, I wondered if there was a network bottleneck causing the issues, so while I have limited SSH access to the Asustor (running BusyBox), I used the handy netcat &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nc&lt;/code&gt; tool, along with pipeviewer &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pv&lt;/code&gt; to create a improvised network speed test…&lt;/p&gt;

&lt;p&gt;The process is simple enough, you create a recieving socket that writes to /dev/null with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pv -l 12345 &amp;gt; /dev/null&lt;/code&gt; and on the sending side you simply write a stack of data with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nc &amp;lt;host&amp;gt; 12345&lt;/code&gt;. Pop a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pv&lt;/code&gt; in the middle and get yourself a progress bar to show bandwidth usage.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Client that recieves with throughput view&lt;/span&gt;
nc 192.168.2.15 12345 | pv &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; /dev/null

&lt;span class=&quot;c&quot;&gt;# Server that sends with throughput view&lt;/span&gt;
pv nfs-test.0.0 | nc &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 12345
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These tests showed a typical result: ~117MB/s, which is pretty much spot-on 1gbit/s.&lt;/p&gt;

&lt;h2 id=&quot;-iscsi-setup-and-performance&quot;&gt;🔄 iSCSI Setup and Performance&lt;/h2&gt;

&lt;p&gt;So… the rabbit hole appears before me… lets see if block devices over iscsi will be performant.&lt;/p&gt;

&lt;p&gt;Using the asustor, i setup a new LUN and Mount with a 4TB thinly provisioned disk, setup some CHAPS authentication and went to work connecting it to my server…&lt;/p&gt;

&lt;h3 id=&quot;setup&quot;&gt;Setup&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Install the iscsi stuff&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;open-iscsi

&lt;span class=&quot;c&quot;&gt;# And see what you can find announced from the NAS&lt;/span&gt;
iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; discovery &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; sendtargets &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once you’ve confirmed that the discovery works, you’ll get a lun target such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;iqn.2011-08.com.asustor:as6706t-425067.media&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So onwards to setting up auth…&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Setup auth&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15 &lt;span class=&quot;nt&quot;&gt;--op&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;update &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; node.session.auth.authmethod &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; CHAP
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15 &lt;span class=&quot;nt&quot;&gt;--op&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;update &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; node.session.auth.username &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; &amp;lt;username&amp;gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15 &lt;span class=&quot;nt&quot;&gt;--op&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;update &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; node.session.auth.password &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; &amp;lt;password&amp;gt;
&lt;span class=&quot;c&quot;&gt;# Save auth between boots&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;--op&lt;/span&gt; update &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; node.startup &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; automatic


&lt;span class=&quot;c&quot;&gt;# now login to the LUN and you should find yourself with a nice new drie&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15 &lt;span class=&quot;nt&quot;&gt;--login&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once the login completes, you’ll find that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lsblk&lt;/code&gt; shows a new drive (in my case &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/dev/sdf&lt;/code&gt;) which you can go ahead and partition, format, mount etc as if it was a normal block device.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkfs.ext4 /dev/sdf1
&lt;span class=&quot;nb&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; /mnt/media
&lt;span class=&quot;c&quot;&gt;# Quick mount to test - Note using the UUID ensures that if the drives reorder on boot, you don&apos;t mount the wrong things&lt;/span&gt;
mount &lt;span class=&quot;nv&quot;&gt;UUID&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;blkid &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; UUID &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; value &lt;span class=&quot;s2&quot;&gt;&quot;/dev/sdf1&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; /mnt/media
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;systemd-mount-unit-1&quot;&gt;Systemd Mount Unit&lt;/h3&gt;

&lt;p&gt;Making the mount paths permanant…&lt;/p&gt;

&lt;div class=&quot;language-ini highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nn&quot;&gt;[Unit]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Mount iSCSI Media Volume&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Requires&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;network-online.target&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;After&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;network-online.target&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Mount]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;What&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;UUID=446c88c1-a51b-4ec4-9ada-9c18856d4b04&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;/mnt/media&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;ext4&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;Options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;defaults,_netdev&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;TimeoutSec&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;30&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[Install]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;WantedBy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;multi-user.target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;fio-test-command-1&quot;&gt;FIO Test Command&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;fio &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;iscsi-test &lt;span class=&quot;nt&quot;&gt;--directory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/mnt/media &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;--size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1G &lt;span class=&quot;nt&quot;&gt;--readwrite&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;rw &lt;span class=&quot;nt&quot;&gt;--bs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;128k &lt;span class=&quot;nt&quot;&gt;--ioengine&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;libaio &lt;span class=&quot;nt&quot;&gt;--iodepth&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;32 &lt;span class=&quot;nt&quot;&gt;--runtime&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;60 &lt;span class=&quot;nt&quot;&gt;--time_based&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So I ran the FIO test again… and…&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;READ:  ~8.2MB/s
WRITE: ~8.2MB/s
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;blockquote&gt;
  &lt;p&gt;iSCSI performance was significantly lower, with notable CPU spikes observed on the NAS during tests.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What..?&lt;/p&gt;

&lt;h2 id=&quot;-observations&quot;&gt;📉 Observations&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;iSCSI imposed heavy CPU load on the Asustor NAS, degrading throughput; Unclear why but some googling suggests thin-provisioning might be to blame
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;media1_*&lt;/code&gt; kernel threads pointed to LUN-related processing.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;NFS used less CPU and offered better throughput overall.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;-final-verdict&quot;&gt;✅ Final Verdict&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;NFS “wins”&lt;/strong&gt; for now… but i’m still pretty disapointed in the overall performance observed.&lt;/p&gt;

&lt;p&gt;More research is needed, as I bet theres something DUMB that i need to fix, but despite my efforts so far, i’m still stuck with a strangely slow NAS.&lt;/p&gt;

&lt;h1 id=&quot;appendix&quot;&gt;Appendix&lt;/h1&gt;

&lt;h2 id=&quot;-iscsi-teardown-steps&quot;&gt;🪯 iSCSI Teardown Steps&lt;/h2&gt;

&lt;h3 id=&quot;unmount-and-stop-mount&quot;&gt;Unmount and Stop Mount&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;umount /mnt/media
systemctl stop mnt-media.mount
systemctl disable mnt-media.mount
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;logout-and-delete-node&quot;&gt;Logout and Delete Node&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15 &lt;span class=&quot;nt&quot;&gt;--logout&lt;/span&gt;
iscsiadm &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; node &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; delete &lt;span class=&quot;nt&quot;&gt;-T&lt;/span&gt; iqn.2011-08.com.asustor:as6706t-425067.media &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 192.168.2.15
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;disable-iscsi-service-optional&quot;&gt;Disable iSCSI Service (Optional)&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;systemctl disable iscsid
systemctl stop iscsid
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;nas-gui-cleanup&quot;&gt;NAS GUI Cleanup&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Go to: &lt;strong&gt;Storage Manager &amp;gt; iSCSI&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Unmount and Delete the LUN and targets&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;


  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2025-07/nfs-iscsi-failures/&quot;&gt;NFS vs iSCSI - My failed experiment&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on July 19, 2025.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[IPv6 on my network]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2015-09/Setting-Up-IPv6/"/>
  <id>http://warmfusion.co.uk/2015-09/Setting-Up-IPv6</id>
  <published>2015-09-22T00:00:00+01:00</published>
  <updated>2015-09-22T00:00:00+01:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;h1 id=&quot;whats-ipv6&quot;&gt;Whats IPv6?&lt;/h1&gt;

&lt;p&gt;IPv6 is a ‘new’ method of identifying devices uniquely on the internet which amongst other useful features
allows for a considerably larger number of machines to be connected at once. You can find plenty of information
about IPv6 on the internet, so rather than trying to repeat other peoples work I’ll just explain my motivations
for my experimentation and assume you have some moderate level of technical ability.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Learning experience
    &lt;ul&gt;
      &lt;li&gt;It’s inevitable that IPv6 will become used more and more frequently in my professional work and
if I want to remain relevant it makes sense to experiment with this technology sooner rather than
later&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Internet of Things (IoT)
    &lt;ul&gt;
      &lt;li&gt;As I create or purchase more and more network enabled devices I’m using IP addresses at home but
 I can’t make them publically accessible - IPv6 lets me trivially access these devices publically&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Docker
    &lt;ul&gt;
      &lt;li&gt;Like (1) combined with (2), it lets me explore allocating IPv6 addresses to docker containers and
 setup more complex network stacks without having to use subnet tricks&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;equipment&quot;&gt;Equipment&lt;/h1&gt;

&lt;p&gt;I’m using an &lt;a href=&quot;www.dd-wrt.com/wiki/index.php/Asus_RT-N16&quot;&gt;Asus RT-N16&lt;/a&gt; flashed with the DD-WRT firmware connected
to a Virgin Media SuperHub set in Modem mode. This means all real network routing work is handled by the Asus
device, and I can set it up to manage an IPv6 network transparently across my whole LAN (including WiFi) for 
clients that can support it.&lt;/p&gt;

&lt;h1 id=&quot;the-process&quot;&gt;The Process&lt;/h1&gt;

&lt;h2 id=&quot;step-1---obtain-an-ipv6-address&quot;&gt;Step 1 - Obtain an IPv6 address&lt;/h2&gt;

&lt;p&gt;I’m using the (Highly recommended) &lt;a href=&quot;https://tunnelbroker.net/&quot;&gt;Hurricane Electric TunnelBroker&lt;/a&gt; service which
provides a free IPv6 /64 range. It can be a little bit technical to setup, but if you’re reading this far I’m
going to assume some level of technical ability.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you select a broker location near home you should get excellent performance; but if you’re feeling adventurous
it &lt;em&gt;may&lt;/em&gt; be possible to select an international broker endpoint and use your IPv6 traffic as a rudementary proxy&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;step-2---enable-ipv6&quot;&gt;Step 2 - Enable IPv6&lt;/h2&gt;

&lt;p&gt;Navigate to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Administration &amp;gt;&amp;gt; Management&lt;/code&gt; and enable IPv6 and Radvd.&lt;/p&gt;

&lt;p&gt;In the Radvd configuration section, add the following config block and ensure you update the
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;REMOTEIP&amp;gt;&lt;/code&gt; with your IPv6 prefix that was just created. For example, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2001:db8:0::/64&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;interface br0 {
  MinRtrAdvInterval 3;
  MaxRtrAdvInterval 10;
  AdvLinkMTU 1480;
  AdvSendAdvert on;
  prefix &amp;lt;REMOTEIP&amp;gt;::/64 {
    AdvOnLink on;
    AdvAutonomous on;
    AdvValidLifetime 86400;
    AdvPreferredLifetime 86400;
    # Base6to4Interface vlan2;
  };
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;step-3---install-ip6tables&quot;&gt;Step 3 - Install ip6tables&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;This step is incomplete - I’ve not worked out how to set this up, and that basically means
all my devices are currently exposed to the world-wild-web.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you want to protect all your IPv6 devices, which will be fully exposed to the internet when they get an IPv6 
address, you will either need to run firewalls (or equivalent) on each of the clients, or install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ip6tables&lt;/code&gt; on
your router itself (Or get a dedicated network firewall).&lt;/p&gt;

&lt;p&gt;Once again the DD-WRT community come to the rescue with instructions on &lt;a href=&quot;http://www.dd-wrt.com/wiki/index.php/IPV6#ip6tables_for_K26_big_images&quot;&gt;how to install ip6tables on dd-wrt&lt;/a&gt; where the basic idea is:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Download or compile the modules&lt;/li&gt;
  &lt;li&gt;SCP the .ko files to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/jffs/lib/modules/2.6.24.111&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;This assumes you’ve setup the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Secure Shell&lt;/code&gt; access to your router&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;… TBC&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-31---userland-things&quot;&gt;Step 3.1 - Userland things&lt;/h2&gt;

&lt;p&gt;The ASUS RT-N16 uses a Broadcom chip, so you could download pre-compiled modules from &lt;a href=&quot;http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-4---script-the-ipv6-configuration&quot;&gt;Step 4 - Script the IPv6 configuration&lt;/h2&gt;

&lt;p&gt;Luckily, the DD-WRT community were able to help set this up, with a very simple &lt;a href=&quot;http://www.dd-wrt.com/wiki/index.php/IPv6#Hurricane_Electric.27s_Tunnelbroker.net&quot;&gt;tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using the tutorial above, and some tinkering, I was able to get my IPv6 configuration working using the following
simple set of commands:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SERVER_IP4=&amp;lt;TunnelBroker Server IPv4 Address&amp;gt;
CLIENT_IP4=&amp;lt;Your Public IPv4&amp;gt;

REMOTE_IP6=&amp;lt;TunnelBroker Server IPv6 Address&amp;gt; # Eg 2001:db8:0:1/64
CLIENT_IP6=&amp;lt;TunnelBroker Client IPv6 Address&amp;gt; # Eg 2001:db8:0:2/64


#Ensure IPv6 modules are loaded
insmod ipv6
# Create a IPv6 over IPv4 tunnel
ip tunnel add he-ipv6 mode sit remote ${SERVER_IP4} local ${CLIENT_IP4} ttl 255
ip link set he-ipv6 up

# Set our Remote IPv6 address on the tunnel device
ip addr add ${REMOTE_IP6} dev he-ipv6

# Transmit all IPv6 traffic through this tunnel
ip route add ::/0 dev he-ipv6

# Setup IPv6 on the Routers internal Bridge device
ip -6 addr add ${CLIENT_IP6} dev br0


# Truth be told - I have no idea why this is needed :-(
ROUTED_ADDRESS=`sed -n -e &apos;s,^ *prefix *\([^ ]*\) *{,\1,p&apos; /tmp/radvd.conf`
BR0_MAC=$(ifconfig br0 |sed -n -e &apos;s,.*HWaddr \(..\):\(..\):\(..\):\(..\):\(..\):\(..\).*,\1\2:\3\4:\5\6,p&apos;)
ip -6 addr add $(echo &quot;$ROUTED_ADDRESS&quot;|sed &quot;s,::/..,::$BR0_MAC/64,&quot;) dev br0
ip -6 route add 2000::/3 dev he-ipv6

# Let the router boot up, otherwise radvd doesn&apos;t work
sleep 5

# Start the Router Advertisement Daemon so machines on the LAN get some IPv6 loveliness
radvd -C /tmp/radvd.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;step-5---persistence&quot;&gt;Step 5 - Persistence&lt;/h2&gt;

&lt;p&gt;Goto &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Administration &amp;gt;&amp;gt; Commands&lt;/code&gt; and copy/paste the script above, changing the configuration variables
as required, and save as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;startup&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Reboot the router, and everything &lt;em&gt;should&lt;/em&gt; just work.&lt;/p&gt;


  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2015-09/Setting-Up-IPv6/&quot;&gt;IPv6 on my network&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on September 22, 2015.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Musings On Neo4j Graph Database]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2014-10/Musings-on-neo4j/"/>
  <id>http://warmfusion.co.uk/2014-10/Musings-on-neo4j</id>
  <published>2014-10-19T00:00:00+01:00</published>
  <updated>2014-10-19T00:00:00+01:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;h1 id=&quot;musings-on-neo4j&quot;&gt;Musings On Neo4j&lt;/h1&gt;

&lt;p&gt;I’ve just finished watching a &lt;a href=&quot;http://geekout.ee&quot;&gt;GeekOut&lt;/a&gt; video entitled &lt;a href=&quot;http://2014.geekout.ee/presentations/#09&quot;&gt;Using ASCII art to analyse source code&lt;/a&gt; which introduced Neo4j’s Cypher syntax to me with some specific examples of its implementation.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;This post is a musing on how to apply Neo4J in the payments world, and the kinds of analysis that would become possible using such a tool. I’ve never used Neo4J, and this is my first experiement in using it. Don’t assume I know what I’m talking about.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;the-scenario&quot;&gt;The Scenario&lt;/h2&gt;

&lt;p&gt;There are two main players in the scenario I’m considering, where the payment service provider is simply the mechanism to deliver these functions. The PSP itself may have some needs, but they’re not being considered here.&lt;/p&gt;

&lt;p&gt;As a customer,
I want to transfer money between myself and merchants
so that merchants will provide me the services I require&lt;/p&gt;

&lt;p&gt;As a merchant,
I want to tools that provide information about my customers and transactions,
So that I can make buisness decisions with the best information possible&lt;/p&gt;

&lt;h2 id=&quot;the-graph&quot;&gt;The Graph&lt;/h2&gt;

&lt;p&gt;So given the scenario above, and some simple assumptions, I would have a few nodes;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Customer&lt;/li&gt;
  &lt;li&gt;PaymentMethod&lt;/li&gt;
  &lt;li&gt;PaymentEvent&lt;/li&gt;
  &lt;li&gt;Merchant&lt;/li&gt;
  &lt;li&gt;MerchantBankDetails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m not too fussed right now about solving the specific needs of the Users defined above, but I am interested in understanding Neo4J a little more, with some more specific experiments.&lt;/p&gt;

&lt;h1 id=&quot;lets-experiment&quot;&gt;Lets Experiment&lt;/h1&gt;

&lt;p&gt;So without further ado, lets get cracking.&lt;/p&gt;

&lt;h2 id=&quot;install&quot;&gt;Install&lt;/h2&gt;

&lt;p&gt;Rather than setting up a local machine, I’m going to use Heroku with a Neo4J addon to make my life simpler.&lt;/p&gt;

&lt;p&gt;From the &lt;a href=&quot;http://www.neo4j.org/develop/heroku&quot;&gt;Documentation&lt;/a&gt; you just need to;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create an application: heroku apps:create your-app-name&lt;/li&gt;
  &lt;li&gt;Add the Database Add-on: heroku addons:add graphenedb&lt;/li&gt;
  &lt;li&gt;Open the Add-On Administration page: heroku addons:open graphenedb&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If that works, you’ll find yourself at the GrapheneDB administration screen on a new heroku application. Magic.&lt;/p&gt;

&lt;h2 id=&quot;database&quot;&gt;Database&lt;/h2&gt;

&lt;p&gt;First steps, lets see how to create a new data record:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;CREATE (c:customer { name:&apos;Toby&apos; })-[:PAYEE]-&amp;gt;(p:payment { id:1234 }),
(m:merchant { name:&apos;Bobs Cars&apos; })-[:PAYMENT_FOR]-&amp;gt;(p),
(pm:paymentMethod { type:&apos;VISA&apos;, cardHash:&apos;1234abcd&apos;})-[:PAYMENT_METHOD]-&amp;gt;(p),
(bd:bankDetails { bank:&apos;BankOfToby&apos;, account_number:98765, accepts:[&apos;VISA&apos;] })-[:BANK_DETAIL]-&amp;gt;(m)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you get that little record loaded into the administration console, you should be able to do a trivial query and get back a graph that looks something like this (I’ve renamed elements etc here)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH n RETURN n LIMIT 25
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/musings-neo4j/payment-relationship.png&quot; alt=&quot;APaymentInNeo4j&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;add-a-link&quot;&gt;Add a link&lt;/h2&gt;

&lt;p&gt;So we probably want to associate customers with merchants directly, rather than inference through transactions, so we can update the database by performing a MATCH operations where we locate customers who’ve paid for a transaction, and the merchants who’ve had payments made to them, and then joining them update with a ‘customer_of’ relationship.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH (c)-[:PAYEE]-&amp;gt;(t)&amp;lt;-[:PAYMENT_FOR]-(m) 
CREATE (c)-[:CUSTOMER_OF]-&amp;gt;(m)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;bigger-data&quot;&gt;Bigger data&lt;/h2&gt;

&lt;p&gt;Having only a single record isn’t very interesting, so lets up the ante a little with some generated data.&lt;/p&gt;

&lt;p&gt;I have created a set of demo data using &lt;a href=&quot;http://generatedata.com&quot;&gt;generatedata.com&lt;/a&gt; which contains a bunch of ‘payments’ which you can use. To import into Neo4j you can use the following query:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;LOAD CSV WITH HEADERS FROM &quot;https://gist.github.com/warmfusion/90e91fe4e7a142bb2dbb/raw/c3925dff448aa77bb6ac87076e0d9efe5e1ce8c5/demo-dataset&quot; AS csvLine
MERGE (c:customer { name: csvLine.name})
MERGE (pm:paymentMethod {cardNumber: csvLine.cardNumber })
MERGE (m:merchant {name: csvLine.merchant_name})
CREATE (p:payment {status: csvLine.status, amount: toFloat(csvLine.amount) })
CREATE (c)-[:PAYEE]-&amp;gt;(p),
(p)-[:PAYMENT_FOR]-&amp;gt;(m),
(pm)-[:PAYMENT_METHOD]-&amp;gt;(p)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The use of MERGE above means that if Neo4j has already loaded a record that matches the defintion, it updates it, otherwise it’s created. This is particularlly useful for merchant records as we’re using 4 companies over and over and it wouldn’t make sense to create
new unique nodes for each.&lt;/p&gt;

&lt;p&gt;Note that Payment is a CREATE operation - This is because payments are never used more than once, and realistically the CSV should have some unique ID, but we’ll just create new records instead.&lt;/p&gt;

&lt;h2 id=&quot;declined-transactions-for-tobys-bikes&quot;&gt;Declined Transactions for Tobys bikes&lt;/h2&gt;

&lt;p&gt;I’d like to know the transactions which have been declined for Tobys Bikes for a report. This can be done quite simply by creating a Match where we look for merchant by name, and follow any relationship to a payment which has been declined.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH (m:merchant { name:&apos;Tobys Bikes&apos;})--(c:payment { status:&apos;Declined&apos;})
RETURN m,c
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;find-relationships-between-customers&quot;&gt;Find relationships between customers&lt;/h2&gt;

&lt;p&gt;Similar to the 6-degrees of Kevin Bacon, its actually very easy to find a relationship between two customers.&lt;/p&gt;

&lt;p&gt;The sample dataset includes a few unusual associations, where the same credit card number is used by different customers, or more usually a customer makes payments to a few different merchants.&lt;/p&gt;

&lt;p&gt;Because of this, the following query shows there is a relationship between Wynter Crosby and Gary Perry:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH (wynter:customer { name:&quot;Wynter Crosby&quot; }),(gary:customer { name:&quot;Gary Perry&quot; }),
  p = shortestPath((wynter)-[*..15]-(gary))
RETURN p
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/musings-neo4j/customer-relationship.png&quot; alt=&quot;Customer-Relationships&quot; /&gt;&lt;/p&gt;

&lt;p&gt;But what does this really show? Well, in this case it’s telling us that;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Wynter made a payment using a credit card which was used again to pay Daves Trucks.&lt;/li&gt;
  &lt;li&gt;Gary meanwhile simply made a payment to Daves Trucks as well…&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So basically: Someone used Wynters credit card to buy something from the same place Gary did too…&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Tip: Madeline Moss is the ‘missing link’ between these customers - She’s used Wynters card :-)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;finding-declines&quot;&gt;Finding Declines&lt;/h2&gt;

&lt;p&gt;Wondering how many transactions were declined for each merchant, I found the aggregate functions. This query returns a list of merchants and a sum of the unique payments which were Declined:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH (m:merchant)--(p:payment {status:&apos;Declined&apos;})
RETURN DISTINCT m, count(DISTINCT p), sum(p.amount)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h1&gt;

&lt;p&gt;I think Neo4J is remarkably powerful, but I found myself slipping up on the definition of nodes and their relationships; How does a Payment relate to a merchant or a customer, is a customer related to a merchant directly, or just through their payments etc. Having too many relationships would likely impact on performance and scale.&lt;/p&gt;

&lt;p&gt;I may experiment futher with considerably larger datasets, but will need to run locally to avoid the 1k node limit on heroku. It seems that mapping between a RDMS with foreign keys would be trivial to implement into a graph database as the join tables or key lookups are just replaced with directional relationships as required. Simple.&lt;/p&gt;

&lt;h1 id=&quot;tricks-learnt&quot;&gt;Tricks Learnt&lt;/h1&gt;

&lt;p&gt;Whilst writing this blog post, I found a few things tripped me up as I went. Nothing breaking with Neo4J, but just my approach itself.&lt;/p&gt;

&lt;h2 id=&quot;truncate-data&quot;&gt;Truncate Data&lt;/h2&gt;

&lt;p&gt;When you’ve got messed up data, you can start fresh by deleting all the records with this;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH (n)
OPTIONAL MATCH (n)-[r]-()
DELETE n,r
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;heroku-limit-1k-nodes&quot;&gt;Heroku Limit 1k Nodes&lt;/h2&gt;

&lt;p&gt;If you load too many elements, eg the csv a few times, you may find you go over the 1k node limit on the free graphene installation&lt;/p&gt;

&lt;p&gt;You’ll need to totally remove and readd the addon as once it goes read-only you can’t even delete nodes… :-(&lt;/p&gt;

&lt;h2 id=&quot;directionality&quot;&gt;Directionality&lt;/h2&gt;

&lt;p&gt;I noticed that I’d gotten the Bank and Merchant relationship wrong earlier.. We actually want to point merchant to a bank detail. So to swap this relationship around, you find all the current nodes with the existing relationship, make a new one that points the other way, and remove the original relationships:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;MATCH (bank)-[r:BANK_DETAIL]-&amp;gt;(merchant)
CREATE (merchant)-[r2:BANK_DETAIL]-&amp;gt;(bank)
// Changes scope back to r 
WITH r
DELETE r
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2014-10/Musings-on-neo4j/&quot;&gt;Musings On Neo4j Graph Database&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on October 19, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Bringing the dashboards]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2014-04/BringTheDashboard/"/>
  <id>http://warmfusion.co.uk/2014-04/BringTheDashboard</id>
  <published>2014-04-01T00:00:00+01:00</published>
  <updated>2014-04-01T00:00:00+01:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;p&gt;One of my passions is to support the people around me to achieve the best they can. Be that by simply providing a listening post to help answer questions in the form of &lt;a href=&quot;http://en.wikipedia.org/wiki/Rubber_duck_debugging&quot;&gt;Rubber Ducking&lt;/a&gt;, supporting tools that help developers build and validate code, through to providing “inspiration” for new ways of working.&lt;/p&gt;

&lt;p&gt;I’ve always been very interested in presenting information to users in innovative new ways, or perhaps finding innovative new data from the noise. An example of this was undertaken during
 a hackathon at PayPoint.net using a Raspberry Pi and an instance of &lt;a href=&quot;http://shopify.github.io/dashing/&quot;&gt;Dashing&lt;/a&gt; to generate a wallboard for the team as a whole.&lt;/p&gt;

&lt;h1 id=&quot;retrospective&quot;&gt;Retrospective&lt;/h1&gt;

&lt;p&gt;We ran the hackathon in early January as a relaxing way to get back into things after a long break over the new year, but after four months I thought it’d be interesting to write up a few of the lessons
I learnt during this time.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://static.ow.ly/photos/normal/4dJx5.jpg&quot; alt=&quot;Dashboard&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;gather-yourself&quot;&gt;Gather Yourself&lt;/h2&gt;

&lt;p&gt;I went into the hackathon with what I considered to be a pretty clear idea of what I was going to do. I wanted to create, using my RPi and Dashing a portal that can sit in the shared area of the office and present
“at a glance” pieces of information that don’t require alot of understanding or interpretation to understand, that’d then spur additional questions and start a conversation.&lt;/p&gt;

&lt;p&gt;The problem was, I didn’t take stock of what I was able to do with Dashing “out of the box”, and so spent considerable time making fairly elaborate new widgets and views only to decide they were cluttered, badly written
or simply “didn’t work”, only to end up using some of the default widgets and simply populating the data from my background jobs.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Moral: Ask what your tools can do for you, not what you can do for your tools.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;take-screenshots&quot;&gt;Take screenshots&lt;/h2&gt;

&lt;p&gt;I found that one of the most fascinating aspects of my experimenting was reviewing the screenshots I took during the event. Every so often, typically around the same time I made a significant git commit, i’d take a screenshot 
to commemorate my progress through the 24 hours. This was fabulous documentary evidence when it came to presenting my activities to the rest of the team as it allowed me to present my thinking, the evolution of the delivery and
gave some meaning to the eventual delivery. I think it also helped demonstrate the work involved in creating elegant, minimalistic designs for customers.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/Dashboard_screenshot_progression.gif&quot; alt=&quot;DashboardsOnTheMove&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Moral: Look to where you have been to see where you may go next&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;release-soon-release-often&quot;&gt;Release Soon, Release Often&lt;/h2&gt;

&lt;p&gt;Within the first half hour I was running the bare dashboard on a second monitor beside my desk, using a built in browser for the Pidori OS that I’d installed. This was a fantastic tool for myself in a number of ways.&lt;/p&gt;

&lt;p&gt;Firstly it made people aware of what I was doing, the monitor was clearly visible from anywhere in the office and people were often coming over to see the progress I was making, and importantly making suggestions to
how to shape the UX, additional data to consume, and starting to think about new ways to shape their own work, both in the hackathon but also in day to day development, that’d help bring this information out in the future.&lt;/p&gt;

&lt;p&gt;The second brilliant thing about running it loud and proud was the quick feedback I obtained when I started pushing the little Raspberry too hard. Running a full GUI and browser, with quite alot of javascript and CSS takes
a considerable amount of CPU, with pages often taking 15 seconds to render. This formed a significant part of my minimalisation of the UX and also highlighted quirks in the resolutions being used between my desktop and the
monitor attached to the Pi.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Moral: If you show it, they will come. And sometimes bring the sprinkles.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&quot;where-are-we-now&quot;&gt;Where are we now?&lt;/h1&gt;

&lt;p&gt;So four months on, what have we done?&lt;/p&gt;

&lt;p&gt;Frankly, nothing. Its incredibly disappointing as the “front-end” components were basically delivered, but one of the hardest things I’ve found is getting data out of our systems in meaningful ways, and ways that don’t consume my whole working day to obtain. The monitor has been moved, the Pi has returned to my laboratory (i.e. my loft) and noone seems to have really noticed/cared.&lt;/p&gt;

&lt;h2 id=&quot;where-next-then&quot;&gt;Where next then?&lt;/h2&gt;

&lt;p&gt;Rather than end on a downer, I’m going to start kicking up a fuss once again. &lt;a href=&quot;https://twitter.com/meadicus&quot;&gt;Martin Owen&lt;/a&gt; recently brought a Pi back from the &lt;a href=&quot;http://www.apistrategyconference.com/2014Amsterdam/&quot;&gt;API Conference&lt;/a&gt; held in Amsterdam, which has rekindled my interest in such a device. This coupled with some desires for some general ongoing statistics means I’m going to once again grabble with obtaining data from our systems, and representing 
back to the teams. So to start things off, heres my short list of stuff to start monitoring, recording, and presenting:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Jenkins builds per hour&lt;/li&gt;
  &lt;li&gt;List of CR’s due for completion in the next week&lt;/li&gt;
  &lt;li&gt;Issues open per sprint team for current sprint
    &lt;ul&gt;
      &lt;li&gt;I think this is considerably easier with the 6.x JIRA installation we’re now using - (I hope)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And	because I’m still an experimenter at heart, and it may be another post:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cups of tea brewed today
    &lt;ul&gt;
      &lt;li&gt;Set of scales - &lt;a href=&quot;http://www.amazon.com/WH-B05-Portable-Electronic-Digital-Kitchen/dp/B00B191BSE&quot;&gt;WH-B05&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;Some &lt;a href=&quot;http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/overview.page&quot;&gt;MSP430&lt;/a&gt; chips&lt;/li&gt;
      &lt;li&gt;A couple of &lt;a href=&quot;https://www.nordicsemi.com/kor/node_176/2.4GHz-RF/nRF24L01P&quot;&gt;Nordic RF transceivers&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;Some &lt;a href=&quot;http://sites.psu.edu/reshmajblog/wp-content/uploads/sites/885/2013/04/spongebob-imagination.jpg&quot;&gt;imagination&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wish me luck…&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2014-04/BringTheDashboard/&quot;&gt;Bringing the dashboards&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on April 01, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Performance Testing in CI]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2014-03/Performance-Testing-In-CI/"/>
  <id>http://warmfusion.co.uk/2014-03/Performance-Testing-In-CI</id>
  <published>2014-03-24T00:00:00+00:00</published>
  <updated>2014-03-24T00:00:00+00:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;p&gt;Systems like Jenkins, Travis-CI, Bamboo and others make it so easy to automatically build, and functionally
test your code that I’m amazed at how little we leverage them for our non-functional testing.&lt;/p&gt;

&lt;p&gt;Non-functional testing refers to anything in your application that isn’t necessarily a “yes/no” behaviour; topics 
such as performance, usability, and security are considered non-functional as your product may well work but may 
take a week to respond, or make your users weep with frustration at poorly considered workflows.&lt;/p&gt;

&lt;p&gt;A topic I’m interested in solving is around bringing what is typically a manual, after the fact action; “Great 
work on delivering that new feature, now lets see how it works in production” into our day to day build cycles.&lt;/p&gt;

&lt;p&gt;I want to understand the ongoing behavioural changes in products by using a combination of automated
performance and security testing coupled with periodic human reviews so that when someone changes code under the hood
we know the impact it has made on the system.&lt;/p&gt;

&lt;p&gt;The problems that need to be solved, or at least embraced are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Reporting
    &lt;ul&gt;
      &lt;li&gt;How do we observe behaviour over time&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Monitoring
    &lt;ul&gt;
      &lt;li&gt;How do we know &lt;strong&gt;what&lt;/strong&gt; caused the change in observed behaviour&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Consistency
    &lt;ul&gt;
      &lt;li&gt;Unlike functional testing, non-functional tests are more concerned with the environment
  upon which you are testing; how we do know the system is in a good steady state before running?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Ease of use
    &lt;ul&gt;
      &lt;li&gt;Theres no point having a framework for these tests if its quickly made obsolete by developers
  failing to update tests as the product changes&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;first-steps&quot;&gt;First Steps&lt;/h1&gt;

&lt;p&gt;As a competent developer 
I want to understand the performance of my application over time
So that I can make appropriate decisions about changing the product&lt;/p&gt;

&lt;p&gt;So&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Using a JMeter project performing simple API actions - as its something people tend to know and understand&lt;/li&gt;
  &lt;li&gt;Setup the performance-plugin in Jenkins&lt;/li&gt;
  &lt;li&gt;Bring the two together&lt;/li&gt;
  &lt;li&gt;Setup job for nightly execution&lt;/li&gt;
  &lt;li&gt;???&lt;/li&gt;
  &lt;li&gt;Profit&lt;/li&gt;
&lt;/ol&gt;

  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2014-03/Performance-Testing-In-CI/&quot;&gt;Performance Testing in CI&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on March 24, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Setting up Shinken on OMD]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2014-03/Setting-up-shinken-on-OMD/"/>
  <id>http://warmfusion.co.uk/2014-03/Setting-up-shinken-on-OMD</id>
  <published>2014-03-19T00:00:00+00:00</published>
  <updated>2014-03-19T00:00:00+00:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;h1 id=&quot;whats-shinken&quot;&gt;Whats Shinken&lt;/h1&gt;

&lt;p&gt;The home page for &lt;a href=&quot;http://www.shinken-monitoring.org/&quot;&gt;Shinken&lt;/a&gt; has the breakdown on what Shinken is, but as a summary, its a drop in replacement for the Nagios core 
engine re-written to be 100% compatible with your existing checks, monitors plugins etc using Python as its base. It provides a new WebUI for displaying service issues
and supports greater scalability and service monitoring.&lt;/p&gt;

&lt;p&gt;I’m very much a beginner, having only thus far installed and setup monitoring on a few hosts, but I hope to be able to integrate Shinken with Graphite, as well as
some of my custom information radiators setup in the office.&lt;/p&gt;

&lt;h1 id=&quot;how-do-i-get-it&quot;&gt;How do I get it?&lt;/h1&gt;

&lt;p&gt;I’m using OMD here, which means its pretty simple to configure Shinken as an alternative check core to Nagios.&lt;/p&gt;

&lt;h2 id=&quot;known-issues&quot;&gt;Known Issues&lt;/h2&gt;

&lt;p&gt;A bug in OMD that stops you from adding new hosts and applying changes from the check_mk UI. It appears that OMD thinks nagios.cfg exists even 
when using Shinken and so when applying those changes the system falls over. The workaround is to provide a nagios.cfg from the shinken configuration,
as well as configure the check_submission system (I dont understand that bit though).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ln -s /omd/sites/&amp;lt;yoursite&amp;gt;/tmp/shinken/shinken-apache.cfg /omd/sites/&amp;lt;yoursite&amp;gt;/tmp/nagios/nagios.cfg
echo &quot;check_submission = &apos;pipe&apos;&quot; &amp;gt;&amp;gt; /omd/sites/&amp;lt;yoursite&amp;gt;/etc/check_mk/main.mk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;swap-nagios-out&quot;&gt;Swap Nagios out&lt;/h2&gt;

&lt;p&gt;Lets make a new site called “shishi” and swap out Nagios for Shinken&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;omd create shishi
omd config shishi set CORE shinken
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;add-contact-group&quot;&gt;Add Contact Group&lt;/h2&gt;

&lt;p&gt;To allow users to login to the Shinken Web UI, you need to configure a contact configuration for Nagios (odd but true)
Enter the following block of configuration into /omd/sites/&lt;mysite&gt;/etc/nagios/conf.d/contact.cfg and restart your omd site&lt;/mysite&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;define contact {
  contact_name                  omdadmin
  alias                         omdadmin admin contact
  host_notification_commands    check-mk-dummy
  service_notification_commands   check-mk-dummy
  host_notification_options     n
  service_notification_options  n
  host_notification_period      24X7
  service_notification_period   24X7
}

define contactgroup {
  contactgroup_name             omdadmin
  alias                         omdadmin admin contact group
  members                       omdadmin
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;enable-mongodb-for-dashboard-persistence&quot;&gt;Enable MongoDB for Dashboard persistence&lt;/h2&gt;

&lt;p&gt;Next enable mongodb so Shinken can store its dashboard configuration. The port may need to be changed&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;omd config shishi set MONGODB on
omd config shishi set MONGODB-TCP_PORT 27018
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Add some configuration to mongodb to shinkens module_webui.cfg - Lines 13 , 22-27&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;define module{
    module_name      WebUI
    module_type      webui
    host             0.0.0.0       ; mean all interfaces
    port             7767
    # CHANGE THIS VALUE!!!!!!!
    auth_secret      CHANGE_ME
    # Advanced options. Do not touch it if you don&apos;t
    # know what you are doing
    #http_backend    wsgiref
    # ; can be also : cherrypy, paste, tornado, twisted
    # ; or gevent
    modules          Apache_passwd,Mongodb
    # Modules for the WebUI.
}
define module{
    module_name      Apache_passwd
    module_type      passwd_webui
    # WARNING : put the full PATH for this value!
    passwd           /omd/sites/shishi/etc/htpasswd
}
define module{
  module_name Mongodb
  module_type mongodb
  uri mongodb://localhost:27018
  database shinken
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;next-steps&quot;&gt;Next Steps&lt;/h1&gt;

&lt;h2 id=&quot;bring-the-graphite&quot;&gt;Bring The Graphite&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.shinken-monitoring.org/wiki/use_with_graphite&quot;&gt;use_with_graphite&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;reap-the-rewards&quot;&gt;Reap the rewards&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Learn more about what makes Shinken different to Nagios by experience&lt;/li&gt;
  &lt;li&gt;See if I can get better integration of Monitored events against continuous datasets
    &lt;ul&gt;
      &lt;li&gt;For example, I want to show when a Jenkins build occured on a build node as a vertical line on my CPU monitors for that node.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;references&quot;&gt;References&lt;/h1&gt;

&lt;p&gt;Alot of googling around was needed to bring these pieces together, here are the main sources of my “knowledge”&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Quick start installation/configuration of Shinken - &lt;a href=&quot;https://labs.consol.de/blog/nagios/how-to-install-bleeding-edge-shinken-in-a-minute-with-omd/&quot;&gt;how to install bleeding edge shinken in a minute with omd&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Logging into Shinken (Contact.cfg) - &lt;a href=&quot;http://www.monitoring-portal.org/wbb/index.php?page=Thread&amp;amp;postID=163198#post163198&quot;&gt;Adding contacts to Shinken&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;MongoDB Configuration example taken from - &lt;a href=&quot;http://www.shinken-monitoring.org/forum/index.php?topic=605.0&quot;&gt;MongoDB in Shinken&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2014-03/Setting-up-shinken-on-OMD/&quot;&gt;Setting up Shinken on OMD&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on March 19, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Warmfusion Reborn]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2014-03/warmfusion-reborn/"/>
  <id>http://warmfusion.co.uk/2014-03/warmfusion-reborn</id>
  <published>2014-03-17T20:48:00+00:00</published>
  <updated>2014-03-17T20:48:00+00:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;p&gt;After a long stay of absence, I’ve decided to try and revive my blogging by using something a bit more portable,
and importantly a bit easier to manage.&lt;/p&gt;

&lt;p&gt;Using &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;jekyll&lt;/a&gt;  and quite possibly a bit of bootstrap once I work my way around the framework, I’ll
get this blog collecting a few of my project ideas and other bits and bobs&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2014-03/warmfusion-reborn/&quot;&gt;Warmfusion Reborn&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on March 17, 2014.&lt;/p&gt;</content>
</entry>


<entry>
  <title type="html"><![CDATA[Building The Internet]]></title>
  <link rel="alternate" type="text/html" href="http://warmfusion.co.uk/2013-11/Building-the-internet/"/>
  <id>http://warmfusion.co.uk/2013-11/Building-the-internet</id>
  <published>2013-11-03T00:00:00+00:00</published>
  <updated>2013-11-03T00:00:00+00:00</updated>
  <author>
    <name>Toby Jackson</name>
    <uri>http://warmfusion.co.uk</uri>
    <email>toby.jackson@warmfusion.co.uk</email>
  </author>
  <content type="html">&lt;h1 id=&quot;built-yourself-the-internet&quot;&gt;Built yourself The Internet&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/images/the_internet.jpg&quot; alt=&quot;The Internet&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A really simple weekend project using some serious overengineering to create a black box with a blinky light.&lt;/p&gt;

&lt;p&gt;List of components;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;2x 1.1K resistors&lt;/li&gt;
  &lt;li&gt;MSP430g2231 Microcontroller&lt;/li&gt;
  &lt;li&gt;1 Red LED (5mm)&lt;/li&gt;
  &lt;li&gt;AA Battery holder&lt;/li&gt;
  &lt;li&gt;Stripboard&lt;/li&gt;
  &lt;li&gt;Small wires(for jumpers)&lt;/li&gt;
  &lt;li&gt;Black Hobby Box&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’d have liked a nice LED mount, but Maplin didn’t have any available, so that might be a later improvement.&lt;/p&gt;

&lt;p&gt;The Idea - Make a blinky box that matches the “feel” of The Internet from the &lt;a href=&quot;http://www.youtube.com/watch?v=iDbyYGrswtg&quot;&gt;IT Crowd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to create a properly wireless device, with as long life as possible. Originally planned to have a few solar cells for indefinite runtime, but I couldn’t find any in my “Spare parts” drawer. Instead, after failing to work out how proper electrical engineers do blinky things, settled on using a microcontroller.&lt;/p&gt;

&lt;p&gt;Aside from being horribly overengineered, I can excuse myself by suggesting that it may be extended at later dates with some features like an RGB LED, LDRs etc. For now… &lt;em&gt;shrugs&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Again, I needed it to be long lasting; I don’t want to waste batteries on such a thing, so I spent some time looking at running the MSP430 in low power mode, along with some interrupt coding.&lt;/p&gt;

&lt;p&gt;The code is available from my GitHub repository here: (warmfusion/TheInternet)[https://github.com/warmfusion/TheInternet]&lt;/p&gt;

&lt;p&gt;The basics are;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Set the P1 ports to OUTPUT as this reduces current consumption on the MSP430 as it doesn’t try and read any input&lt;/li&gt;
  &lt;li&gt;Turn on the input VLO oscillator ready to start counting&lt;/li&gt;
  &lt;li&gt;Ensure interrupts are going, and go into Low Power Mode 3 (LPM3)&lt;/li&gt;
  &lt;li&gt;After a delay, the interrupt is called, toggling the LED&lt;/li&gt;
  &lt;li&gt;As an addition, I change the cycle counter on each toggle so that the LED blink has a longer pause than the on time.&lt;/li&gt;
&lt;/ul&gt;


  &lt;p&gt;&lt;a href=&quot;http://warmfusion.co.uk/2013-11/Building-the-internet/&quot;&gt;Building The Internet&lt;/a&gt; was originally published by Toby Jackson at &lt;a href=&quot;http://warmfusion.co.uk&quot;&gt;Warmfusion.co.uk&lt;/a&gt; on November 03, 2013.&lt;/p&gt;</content>
</entry>

</feed>
