Winlogbeat getting x509: certificate signed by unknown authority when sending to elasticsearch


I have recently sucessfully connected my winlogbeat to logstash, however now I am trying to connect it to elastic in order to do the --setup dashboards and --setup index. I was trying to disable logstash and connect it to elasticsearch directly but I am getting the error ERROR x509: certificate signed by unknown authority when I try and test my config. I am testing this on a development server that has had certificates and xpack settings enabled.

C:\winlogbeats> .\winlogbeat.exe -c .\winlogbeat.yml test output
elasticsearch: https://x.251.10.68:9200...
parse url... OK
parse host... OK
dns lookup... OK
addresses: x.251.10.68
dial up... OK
security: server's certificate chain verification is enabled
handshake... ERROR x509: certificate signed by unknown authority

My winlogbeat.yml file contains:


  • name: Application
    ignore_older: 72h
  • name: Security
  • name: System

index.number_of_shards: 3
#index.codec: best_compression
#_source.enabled: false


host: ""
ssl.verification_mode: none

hosts: ["https://x.251.10.68:9200", "https://x.251.10.59:9200", "https://x.251.10.84:9200"]
protocol: "https"
protocol: "https"
username: "elastic"
password: "mypassword"


  • add_host_metadata: ~
  • add_cloud_metadata: ~

logging.level: info

Original Logstash Pipeline:

input {
beats {
port => 5959

output {
elasticsearch {
hosts => ["https://x.251.10.68:9200", "https://x.251.10.84:9200", "https://x.251.10.59:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
ssl => true
user => 'elastic'
password => 'mypassword'
document_type => "%{[@metadata][type]}"

Do I need to import a certificate from kibana in order to make a connection to elasticsearch? ANy thoughts to get winlogbeat to coperate with elasticsearch so I can setup dashboards and indexes?

This is a result of how your Elasticsearch http certificate has been generated/signed.
You didn't provide your elasticsearch.yml, so we can't tell what certificate you're using there, and how it was configured.

In elasticsearch, you will have settings for one or more of:

Those control which certificate your ES node presents on the http port (9200). They will have been issued by a certificate authority. If you created them using the elasticsearch-certutil tool, then you will probably have your own certificate authority, and you will need to export it into a PEM format that winlogbeat can read, and configure it in output.elasticsearch.ssl.certificate_authorities

Alternatively, if you got the certificate from an existing Certificate Authority (a commercial CA, or your own corporate CA) then you will need to get a copy of the CA in PEM format and use it for output.elasticsearch.ssl.certificate_authorities.

As a temporary workaround, you could set output.elasticsearch.ssl.verification_mode: none but this is a dangerous setting, and will disable many of the intended benefits of using SSL. We strongly advise against configuring that on a production server.

As a separate issue:

We don't recommend using the elastic user for data ingest. That user has full superuser privileges and can do everything on your cluster (delete data, change cluster settings, change user passwords, etc). If someone gets access to the password (which is stored in plaintext in your beats config) then they have full control of your cluster.

You should create a new user specifically for beat ingest, and give it a role that only has access to the indices you want winlogbeat to write to

1 Like

Thanks for the reply, that was very informative. Right now this system is just a dev cluster and is only used for testing purposes and no real logs are being sent to it, but I definitely understand those security risks of using the elastic account.

I copied the settings from my elasticsearch.yml and it is below. Would I need to just copy these certs to the winlogbeat host and add the path to the winlogbeat.yml? Would one of these need to be recreated as a pem file? mv-dev ${HOSTNAME} /data
path.logs: /var/log/elasticsearch x.251.10.84 true
node.ingest: true ["x.251.10.68", "x.251.10.84", "x.251.10.59"]
path.repo: ["/data/backup"] true certificate /etc/elasticsearch/certs/nuqs-esdev02/nuqs-esdev02.key /etc/elasticsearch/certs/nuqs-esdev02.nuqs-esdev02.crt [ "/etc/elasticsearch/certs/ca/ca.crt" ] true /etc/elasticsearch/certs/ /etc/elasticsearch/certs/ [ "/etc/elasticsearch/certs/ca/ca.crt" ]

xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true

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