title: Filebeat "error loading config file: yaml: did not find expected key"
body: <p>Im stacked at this issue.</p>
  
  <p>I have an Elasticsearch server with x-pack security enabled. 
  A client with Filebeat that is sending outputs to that server.
  All is working fin without enabling x-pck security, but whe doing it, in the lient I have this error message.</p>
  
  <pre><code>./filebeat test config -v
  Exiting: error loading config file: yaml: line 157: did not find expected key
  </code></pre>
  
  <p>The line that causes the error is the "username" and "password". When commented, the config test is OK, but when username and password is uncommented the error appears</p>
  
  <pre><code>#-------------------------- Elasticsearch output ------------------------------
  output.elasticsearch.hosts: ["X.X.X.X:9200"]
  
    # Array of hosts to connect to.
    #hosts: ["localhost:9200"]
  
    # Protocol - either `http` (default) or `https`.
    #protocol: "http"
  
    # Authentication credentials - either API key or username/password.
    #api_key: "id:api_key"
    username: "elastic"
    password: "&lt;password_generated_in_server&gt;"
  </code></pre>
  
  <p>Connection is working fine with a XGET request like this:</p>
  
  <pre><code>curl -XGET 'http://X.X.X.X:9200/_all/_search?q=*&amp;pretty' -u elastic:&lt;password_generated_in_server&gt;
  </code></pre>
  
  <p>Do I need to acivate any x-pack module, option or create the user manually?</p>
  
  <p>My enabled modules are system, elasticsearch and auditd.
  Im using a go build for arm in the client.</p>
  
  <p>Thanks</p>