title: How do I send data to logstack from NodeJS with custom parameters?
body: <p>I'm currently using logstash-client:</p>
  
  <pre><code>const Logstash = require('logstash-client');     
  const logstash = new Logstash({
    type: 'udp',
    host: 'server.com',
    port: 50000
  });
  
  logstash.send({"execution":"successful","sourceInfo":"[not set]"/*, ... */});
  </code></pre>
  
  <p>But as a result, in Kibana, all logs sent by the code above are grouped under the "message" parameter:</p>
  
  <p><a href="https://i.stack.imgur.com/L1QAx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L1QAx.png" alt="enter image description here"></a></p>
  
  <p><strong>How do make it so that the parameters I send (execution, sourceInfo etc) are on the same level as @timestamp, @version, _id etc?</strong></p>
  
  <p>Maybe there is a different library that allows sending such requests?</p>
  
  <p>The reason I need this is that I want to make search queries like <code>sourceInfo: "[not set]" AND execution: "successful"</code>, but it doesn't seem possible when these parameters are inside the message.</p>