title: salt mine for all network interfaces
body: <p>I'm having difficulty configuring <code>collectd.conf</code> using the <code>interface</code> plugin through <code>salt</code>. The <code>collectd.conf</code> expects a list of network interfaces to monitor like:</p>
  
  <pre><code>&lt;Plugin interface&gt;
    Interface "em1"
    Interface "em2"
  &lt;/Plugin&gt;
  </code></pre>
  
  <p>I've worked out that I need to use a <code>salt mine</code> to pull the grains into the master - which is achieved through a pillar sls like the following:</p>
  
  <pre><code>mine_functions:
    network.interfaces: []
  </code></pre>
  
  <p>and in my <code>collectd.conf</code> I have:</p>
  
  <pre><code>&lt;Plugin interface&gt;
  {% for host, info in salt['mine.get']('*','network.interfaces').items() %}
   {% if host == grains['id'] %}
    {% for interface in info %}
    Interface "{{ interface }}"
    {% endfor %}
   {% endif %}
  {% endif %}
  {% endfor %}
  &lt;/Plugin&gt;
  </code></pre>
  
  <p>However, it doesn't appear to work for me :(</p>