HTTP error 401 in node: 401 Unauthorized

Elastic 6.1.1
Metricbeat 6.2.2

I have metricbeat on an elasticsearch server and when I check kibana all I see are errors:

HTTP error 401 in node: 401 Unauthorized

When I view the logs I don't see anything to indicate the API cannot be reached and the rest of the logs populate just fine.

My module is configured as:

#------------------------------ Elasticsearch ------------------------------#
metricbeat.modules:
- module: elasticsearch
  metricsets: ["node", "node_stats"]
  period: 10s
  hosts: ["localhost:9200"]

When I use the credentials in the output block everything works. And since the system metric logs make it it appears that I can auth to elasticsearch for bulk indexing. Do I need to specify creds in the module? I do have xpack enabled.

If you X-Pack security enabled then you'll need to configure the module with the appropriate credentials and/or TLS settings.

metricbeat.modules:
- module: elasticsearch
  metricsets: ["node", "node_stats"]
  period: 10s
  hosts: ["localhost:9200"]
  username: user
  password: secret

Thank you. The documentation and example yml file didn't specify. I appreciate the I fo. I'll put it there and test. It would be nice if it could inherit the info from the output.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.