title: Extracting fields in Logstash
body: <p>I am using Logstash (with Kibana as the UI).  I would like to extract some fields from my logs so that I can filter by them on the LHS of the UI.</p>
  
  <p>A sample line from my log looks like this:</p>
  
  <pre><code>2013-07-04 00:27:16.341 -0700 [Comp40_db40_3720_18_25] client_login=C-316fff97-5a19-44f1-9d87-003ae0e36ac9 ip_address=192.168.4.1
  </code></pre>
  
  <p>In my logstash conf file, I put this:</p>
  
  <pre><code>filter {
      grok {
          type =&gt; "mylog"
          pattern =&gt; "(?&lt;CLIENT_NAME&gt;Comp\d+_db\d+_\d+_\d+_\d+)"
      }
  }
  </code></pre>
  
  <p>Ideally, I would like to extract Comp40_db40_3720_18_25 (the number of digits can vary, but will always be at least 1 in each section separated by _) and client_login (can also be client_logout).  Then, I can search for CLIENT_NAME=Comp40... CLIENT_NAME=Comp55, etc.</p>
  
  <p>Am I missing something in my config to make this a field that I can use in Kibana?</p>
  
  <p>Thanks!</p>