简体   繁体   English

将 filebeat 连接到 Kibana

[英]Connecting filebeat to Kibana

I'm trying to setup filebeat on a server and then run the setup on a Elastic Stack Docker container setup.我正在尝试在服务器上设置 filebeat,然后在 Elastic Stack Docker 容器设置上运行设置。 But currently whatever I try there is no option to get it working.但目前无论我尝试什么,都没有办法让它工作。 With or without https I'm getting the following error:有或没有 https 我收到以下错误:

2019-03-05T14:58:20.458+0100    ERROR   instance/beat.go:911    Exiting: Failed to import index-pattern: Failed to load directory /usr/share/filebeat/kibana/6/index-pattern:
          error loading /usr/share/filebeat/kibana/6/index-pattern/filebeat.json: fail to execute the HTTP POST request: Post http://10.248.115.125:5601/api/kibana/dashboards/import?force=true: net/http: request canceled (Client.Timeout exceeded while awaiting headers). Response:
        Exiting: Failed to import index-pattern: Failed to load directory /usr/share/filebeat/kibana/6/index-pattern:
          error loading /usr/share/filebeat/kibana/6/index-pattern/filebeat.json: fail to execute the HTTP POST request: Post http://10.248.115.125:5601/api/kibana/dashboards/import?force=true: net/http: request canceled (Client.Timeout exceeded while awaiting headers). Response:

firebeat.yml is configured as: firebeat.yml 配置为:

# List of inputs to fetch data.
filebeat.inputs:
- type: log

  paths:
    - "/var/log/nova/*.log"
  document_type: nova

  paths:
    - "/var/log/neutron/*.log"
  document_type: neutron

  paths:
    - "/var/log/messages"
  document_type: syslog

  paths:
    - "/var/log/openvswitch/*.log"
  document_type: openvswitch

  paths:
    - "/var/log/ceilometer/*.log"
  document_type: ceilometer

  paths:
    - "/var/log/libvirt/*.log"
  document_type: libvirt

  # Change to true to enable this input configuration.
  enabled: true

output.elasticsearch:
  hosts: '10.000.000.000:9200'

  # Optional SSL settings
  #ssl.enabled: true
  #ssl.verification_mode: "none"

  protocol: "http"
  #username: "elastic"
  #password: "Nd6nFv8ktCbZMqKgiLsFgQ=="

  #template.name: "filebeat"
  #template.path: "filebeat.template.json"

setup.kibana:
  host: "http://10.000.000.000:5601"
  #username: "elastic"
  #password: "Nd6nFv8ktCbZMqKgiLsFgQ=="
  protocol: "http"
  ssl.enabled: false

processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

filebeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s

Kibana is running with Elasticsearch and logstash on on other host in Docker containers. Kibana 在 Docker 容器中的其他主机上运行 Elasticsearch 和 logstash。

I suppose when you change kibana.host as described in the documentation , you will be able to create dashboard:kibana.host按照文档中的描述更改kibana.host时,您将能够创建仪表板:

setup.kibana:
  host: "10.0.0.0:5601"
  protocol: "http"
  ssl.enabled: false

It's user authorization issue.是用户授权问题。 Filebeat before loading data into ES, load Kibana dashboard and fails. Filebeat 在将数据加载到 ES 之前,加载 Kibana 仪表板并失败。 Switch your security to IP whitelisting in aws or FB to Logstash and then to ES will work.将您的安全性切换到 aws 或 FB 中的 IP 白名单到 Logstash,然后切换到 ES 即可。 Reference 参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM