title: Logstash : send logs using curl
body: <p>I have an ELK server to manage my logs. Generally they are send to automaticaly. All works fine.
  But for some reason, sometimes, we need to send a log file.</p>
  
  <p>I'm trying to do like this : </p>
  
  <pre><code>curl -F "file=@&lt;my_file_path&gt;" http://&lt;ELK_server_host&gt;:5001
  </code></pre>
  
  <p>And this conf (part that is usefull here) on the server side : </p>
  
  <pre><code>input {
      ...
      tcp {
          port =&gt; 5001
          type =&gt; "curl"
          codec =&gt; line { charset =&gt; "UFT-8" }
      }
      .....
  }
  
  filter {
      .....
      if "curl" == [type] {
          multiline {
              pattern =&gt; "^%{TIMESTAMP_ISO8601}"
              negate =&gt; true
              what =&gt; previous
          }
          grok {.....}
          date {.....}
      }
      .....
  }
  
  output {
      stdout { codec =&gt; rubydebug }
      elasticsearch {
          host =&gt; localhost
      }
  }
  </code></pre>
  
  <p>This work really good <strong>BUT</strong> there is two little difficulties :</p>
  
  <ul>
  <li>The last (not empty) line of the file is ignored</li>
  <li>Curl command never stop. I have to kill with <em>Ctrl+C</em>.</li>
  </ul>
  
  <p>Maybe this two points are connected but what is there a solution? Maybe the multiline filter is a problem?</p>