title: Parse sql log from log file using logstash
body: <p>I want to read MSSQL logs from log file, Written the NXLOG code as following,</p>
  
  <pre><code>&lt;Input sql-logs&gt;
      Module      im_file
      File 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log\ERRORLOG*'
      ReadFromLast TRUE
      Exec        if $raw_event =~ /^#/ drop();                    \
                  else                                             \
                  {                                                \
                      sql-&gt;parse_csv();                            \
                      #$EventTime = parsedate($date + " " + $time); \
                      to_json ();                                  \
                  }
  &lt;/Input&gt;
  </code></pre>
  
  <p>Where module SQL is,</p>
  
  <pre><code>&lt;Extension sql&gt;      
      Module      xm_csv
      Fields      $date, $time, $hostname, $message
      FieldTypes  string, string, string, string
      Delimiter   ' '
  &lt;/Extension&gt;
  </code></pre>
  
  <p>And Output configuration is,</p>
  
  <pre><code>&lt;Output sql-out&gt;
      Module      om_tcp
      Host        192.168.1.14
      Port        5222
  &lt;/Output&gt;
  </code></pre>
  
  <p>I have uploaded sample file in <a href="https://app.box.com/files/0/f/0/1/f_24096170945" rel="nofollow noreferrer">box</a>, You can open the file using chrome, There is no error message in both <code>NXLOG</code> and <code>Logstash</code>, But I couldn't see the output.</p>
  
  <p>I mean there is no data received from this file.</p>