title: Get free disk space in percentage for multiple nodes using Grafana
body: <p>I use Grafana (v2.1.3) for metrics visualization.
  Metrics comes from Graphite collected by collectd. The target graph is to display <strong>free</strong> disk space in <strong>percents</strong> for <strong>multiple</strong> nodes, e.g. lets say folder is /data, so metric which represents free space in bytes is:</p>
  
  <pre><code>collectd.$node.df-data.df_complex-free
  </code></pre>
  
  <p>The metrics which represent total space is sum of:     </p>
  
  <pre><code>collectd.$node.df-data.*
  </code></pre>
  
  <p>So, I have following config:</p>
  
  <pre><code>Series A: collectd.$node.df-data.df_complex-free (Invisible)
  Series B: collectd.$node.df-data.* (Invisible)
  Series C: alias(asPercent(#A, sumSeries(#B)), 'Free space')
  </code></pre>
  
  <p>Here $node is a variable which is selected from drop-down list (All, node1, node2, node3, etc.). It works as expected when one specific node is selected, but wrong one <strong>All</strong> option is selected, (e.g. if percentage per node is ~ 95%, then when All is selected 24% is displayed).</p>
  
  <p>Another option (would be probably more preferable:</p>
  
  <pre><code>Series A: collectd.$node.df-data.df_complex-free
  Series B: groupByNode(collectd.$node.df-data.*, 1, 'sum')
  Series C: scale(divideSeries(#A, #B), 100)
  </code></pre>
  
  <p>Again for single node it's fine, but once "All nodes" option is selected, then following error is displayed:</p>
  
  <p><em>divideSeries second argument must reference exactly 1 series</em></p>
  
  <p>Any ideas? I believe there should be simple solution.</p>