Docker ELK 5.4.0 - Kibana没有正确加载。检查服务器输出以获取更多信息

时间:2017-05-22 10:41:52

标签: docker docker-compose kibana elastic-stack

我遇到了kibana官方码头工人ELK堆栈的麻烦。 我正在使用docker compose来启动一个由elasticsearch,logstash和kibana组成的完整堆栈。 堆栈对我来说似乎很好,在logstash和elasticsearch中一切正常。我可以在相关日志(docker logs -f $ container_id)中找到预期的everithing。 但是,当我尝试访问kibana Web控制台时,我收到此错误:

  

Kibana没有正确加载。检查服务器输出以获取更多信息   信息。

并非每个请求都会出现此错误。 有时页面加载了破碎的样式或缺少图像。我不明白为什么。我在网上发现了同样的问题,但没有提出的解决方案对我有用。此外,问题是目前我甚至无法完全理解问题。 在我看来与容器之间的内部http路由相关的东西,但老实说我不确定

我附上了所有有用的信息。

谢谢!

docker ps输出:

CONTAINER ID        IMAGE                                                 COMMAND                  CREATED             STATUS              PORTS                              NAMES
00862576b0e9        docker.elastic.co/kibana/kibana:5.4.0                 "/bin/sh -c /usr/l..."   11 minutes ago      Up 11 minutes       0.0.0.0:5601->5601/tcp             beaconelk_kibana_1
f9263d8f6c93        docker.elastic.co/logstash/logstash:5.4.0             "/usr/local/bin/do..."   11 minutes ago      Up 11 minutes       5044/tcp, 0.0.0.0:9600->9600/tcp   beaconelk_logstash_1
4cbd3b13d074        docker.elastic.co/elasticsearch/elasticsearch:5.4.0   "/bin/bash bin/es-..."   11 minutes ago      Up 11 minutes       9200/tcp, 9300/tcp                 beaconelk_elasticsearch_1

Kibana日志(有些奇怪304):

{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["status","plugin:kibana@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["status","plugin:elasticsearch@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["status","plugin:xpack_main@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["error","elasticsearch","admin"],"pid":1,"message":"Request error, retrying\nHEAD http://elasticsearch:9200/ => connect ECONNREFUSED 172.18.0.2:9200"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["status","plugin:xpack_main@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from yellow to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2017-05-22T10:24:28Z","tags":["status","plugin:elasticsearch@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from yellow to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2017-05-22T10:24:29Z","tags":["status","plugin:graph@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:29Z","tags":["status","plugin:monitoring@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:29Z","tags":["reporting","warning"],"pid":1,"message":"Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml"}
{"type":"log","@timestamp":"2017-05-22T10:24:29Z","tags":["status","plugin:reporting@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:31Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2017-05-22T10:24:31Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2017-05-22T10:24:34Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2017-05-22T10:24:34Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2017-05-22T10:24:37Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2017-05-22T10:24:37Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2017-05-22T10:24:46Z","tags":["status","plugin:security@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:46Z","tags":["security","warning"],"pid":1,"message":"Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml"}
{"type":"log","@timestamp":"2017-05-22T10:24:46Z","tags":["security","warning"],"pid":1,"message":"Session cookies will be transmitted over insecure connections. This is not recommended."}
{"type":"log","@timestamp":"2017-05-22T10:24:46Z","tags":["status","plugin:searchprofiler@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:46Z","tags":["status","plugin:ml@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:ml@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - Waiting for Elasticsearch","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:tilemap@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:watcher@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:console@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:metrics@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:xpack_main@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:graph@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:reporting@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:security@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:searchprofiler@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:ml@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from yellow to yellow - No existing Kibana index found","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:tilemap@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:watcher@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:elasticsearch@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:timelion@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["listening","info"],"pid":1,"message":"Server running at http://0:5601"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","ui settings","info"],"pid":1,"state":"yellow","message":"Status changed from uninitialized to yellow - Elasticsearch plugin is yellow","prevState":"uninitialized","prevMsg":"uninitialized"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:ml@5.4.0","error"],"pid":1,"state":"red","message":"Status changed from yellow to red - Service Unavailable","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:elasticsearch@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Kibana index ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","ui settings","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Elasticsearch plugin is yellow"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["license","info","xpack"],"pid":1,"message":"Imported license information from Elasticsearch for [data] cluster: mode: trial | status: active | expiry date: 2017-06-21T10:24:40+00:00"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:xpack_main@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:graph@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:reporting@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:security@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:searchprofiler@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:ml@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"Service Unavailable"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:tilemap@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:watcher@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["license","info","xpack"],"pid":1,"message":"Imported license information from Elasticsearch for [monitoring] cluster: mode: trial | status: active | expiry date: 2017-06-21T10:24:40+00:00"}
{"type":"log","@timestamp":"2017-05-22T10:24:47Z","tags":["status","plugin:monitoring@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from green to yellow - Waiting for Monitoring Health Check","prevState":"green","prevMsg":"Ready"}
{"type":"log","@timestamp":"2017-05-22T10:24:49Z","tags":["status","plugin:monitoring@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Waiting for Monitoring Health Check"}
{"type":"log","@timestamp":"2017-05-22T10:24:50Z","tags":["status","plugin:ml@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from green to yellow - No .ml-anomalies-* index pattern found - creating index pattern","prevState":"green","prevMsg":"Ready"}
{"type":"log","@timestamp":"2017-05-22T10:24:50Z","tags":["status","plugin:ml@5.4.0","info"],"pid":1,"state":"yellow","message":"Status changed from yellow to yellow - No .ml-notifications index pattern found - creating index pattern","prevState":"yellow","prevMsg":"No .ml-anomalies-* index pattern found - creating index pattern"}
{"type":"log","@timestamp":"2017-05-22T10:24:52Z","tags":["status","plugin:ml@5.4.0","info"],"pid":1,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"No .ml-notifications index pattern found - creating index pattern"}
{"type":"response","@timestamp":"2017-05-22T10:24:53Z","tags":[],"pid":1,"method":"get","statusCode":200,"req":{"url":"/app/kibana","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","cache-control":"max-age=0","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","referer":"http://localhost:5601/","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/"},"res":{"statusCode":200,"responseTime":304,"contentLength":9},"message":"GET /app/kibana 200 304ms - 9.0B"}
{"type":"response","@timestamp":"2017-05-22T10:24:53Z","tags":[],"pid":1,"method":"get","statusCode":304,"req":{"url":"/ui/fonts/open_sans/open_sans_v13_latin_300.woff2","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","origin":"http://localhost:5601","if-none-match":"\"2da4d6d1b1bef32c05719680145b61613b3829b4\"","if-modified-since":"Fri, 28 Apr 2017 17:55:02 GMT","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"*/*","referer":"http://localhost:5601/app/kibana","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":304,"responseTime":25,"contentLength":9},"message":"GET /ui/fonts/open_sans/open_sans_v13_latin_300.woff2 304 25ms - 9.0B"}
{"type":"response","@timestamp":"2017-05-22T10:24:53Z","tags":[],"pid":1,"method":"get","statusCode":304,"req":{"url":"/bundles/commons.style.css?v=15063","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"text/css,*/*;q=0.1","referer":"http://localhost:5601/app/kibana","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4","if-none-match":"\"beb4383d80d2e37de171d93229b3bbac7adf053d-gzip\"","if-modified-since":"Tue, 09 May 2017 00:30:03 GMT"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":304,"responseTime":11,"contentLength":9},"message":"GET /bundles/commons.style.css?v=15063 304 11ms - 9.0B"}
{"type":"response","@timestamp":"2017-05-22T10:24:53Z","tags":[],"pid":1,"method":"get","statusCode":304,"req":{"url":"/bundles/kibana.style.css?v=15063","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"text/css,*/*;q=0.1","referer":"http://localhost:5601/app/kibana","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4","if-none-match":"\"2c50da9e3b7cf991930ae6ef8b6539b6c0c6662c-gzip\"","if-modified-since":"Tue, 09 May 2017 00:30:03 GMT"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":304,"responseTime":22,"contentLength":9},"message":"GET /bundles/kibana.style.css?v=15063 304 22ms - 9.0B"}
{"type":"response","@timestamp":"2017-05-22T10:24:53Z","tags":[],"pid":1,"method":"get","statusCode":304,"req":{"url":"/ui/favicons/favicon-16x16.png","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"image/webp,image/*,*/*;q=0.8","referer":"http://localhost:5601/app/kibana","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4","if-none-match":"\"f33f077bfe13045136046c93b6180be0379386ff\"","if-modified-since":"Fri, 28 Apr 2017 17:55:02 GMT"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":304,"responseTime":9,"contentLength":9},"message":"GET /ui/favicons/favicon-16x16.png 304 9ms - 9.0B"}
{"type":"response","@timestamp":"2017-05-22T10:24:53Z","tags":[],"pid":1,"method":"get","statusCode":304,"req":{"url":"/ui/favicons/favicon-32x32.png","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"image/webp,image/*,*/*;q=0.8","referer":"http://localhost:5601/app/kibana","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4","if-none-match":"\"128bd421ef426ccdd9ea3293f79d25687b9832e7\"","if-modified-since":"Fri, 28 Apr 2017 17:55:02 GMT"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/app/kibana"},"res":{"statusCode":304,"responseTime":3,"contentLength":9},"message":"GET /ui/favicons/favicon-32x32.png 304 3ms - 9.0B"}
{"type":"response","@timestamp":"2017-05-22T10:24:54Z","tags":[],"pid":1,"method":"get","statusCode":200,"req":{"url":"/app/kibana","method":"get","headers":{"host":"localhost:5601","connection":"keep-alive","cache-control":"max-age=0","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","referer":"http://localhost:5601/","accept-encoding":"gzip, deflate, sdch, br","accept-language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4"},"remoteAddress":"172.18.0.1","userAgent":"172.18.0.1","referer":"http://localhost:5601/"},"res":{"statusCode":200,"responseTime":21,"contentLength":9},"message":"GET /app/kibana 200 21ms - 9.0B"}

我的浏览器输出:enter image description here

这是我的撰写文件:

version: '2'
services:
    elasticsearch:
      image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
      restart: always
      environment:
        - http.host=0.0.0.0 
        - transport.host=0.0.0.0
        - xpack.security.enabled=false
    logstash:
      image: docker.elastic.co/logstash/logstash:5.4.0
      restart: always
      volumes:
        - "${LOGSTASH_PIPELINE_PATH}:/usr/share/logstash/pipeline/"
      depends_on:
        - "elasticsearch"    
      ports:
        - ${LOGSTASH_EXPOSE_PORT}:9600
    kibana:
      image: docker.elastic.co/kibana/kibana:5.4.0
      restart: always
      depends_on:
        - "logstash"   
      ports:
        - ${KIBANA_EXPOSE_PORT}:5601     

和同一目录中的.env文件:

LOGSTASH_PIPELINE_PATH=/Users/andreadilisio/Documents/development/docker/beacon-elk/logstash-pipeline
KIBANA_EXPOSE_PORT=5601
LOGSTASH_EXPOSE_PORT=9600

和我的logstash配置:

input { 
  http {
    host => "0.0.0.0"
    port => 9600
  }
}

filter {
  json{
      source => "message"
      skip_on_invalid_json => false
  }
}

output {
  stdout { codec => rubydebug }
  elasticsearch { 
    hosts => ["elasticsearch:9200"]
    user => elastic
    password => changeme
  }
}

0 个答案:

没有答案