Filebeat через HTTPS - PullRequest
       139

Filebeat через HTTPS

0 голосов
/ 03 августа 2020

Я совершенно новичок в ie в elk, но в настоящее время развертываю стек ELK с помощью docker -compose (https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-docker.html TLS part).

Elasticsearch и Kibana корректно работает в HTTPS.

Однако я не понимаю, как включить Filebeat через HTTPS. Я хотел бы отправить свои nginx журналы, которые находятся на другом сервере ( вместо inte rnet, поэтому я не хочу отправлять журналы в виде открытого текста). В HTTP все работает нормально, но когда я переключаюсь на HTTPS и перезагружаю Filebeat, я получаю следующее сообщение:

Error: ... Get https://10.15.0.12:9200: x509: certificate is valid for 127.0.0.0.1, not 10.15.0.12

Я знаю, что делаю что-то не так, но не могу найти ответ для Filebeat через HTTPS. ..

Вот моя конфигурация Filebeat:

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["10.15.0.12:9200"]

  # Protocol - either `http` (default) or `https`.
  protocol: "https"

  # Authentication credentials - either API key or username/password.
  username: "elastic"
  password: "myelasticpassword"

Заранее спасибо.

1 Ответ

0 голосов
/ 04 августа 2020

Я обнаружил ошибку:

Мой самоподписанный сертификат был для хоста 127.0.0.1.

Я изменил IP-адрес в instance.yml

Затем я изменил свою конфигурацию filebeat:

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["xx.xx.xx.xx:9200"]

  # Protocol - either `http` (default) or `https`.
  protocol: "https"

  # Authentication credentials - either API key or username/password.
  #api_key: "id:api_key"
  username: "elastic"
  password: "mypassword"
  ssl.verification_mode: none
...