当前位置:   article > 正文

Centos7.5安装Kibana7.17和Logstash7.17_pipelines yaml file is empty

pipelines yaml file is empty

安装Kibana: 

Past Releases of Elastic Stack Software | Elastic

下载对应版本的Kibana,上传Linux服务器,解压/home/software/kibana-7.17/

放开的配置如下

  1. server.port: 5601
  2. server.host: "0.0.0.0"
  3. server.publicBaseUrl: "http://122.51.53.xxx:5601"
  4. elasticsearch.hosts: ["http://localhost:9200"]
  5. // 因为ElasticSearch与kibana是安装在同一服务器,所以是localhost

 Kibana如果用root用户启动也会报错跟ElasticSearch一样,需要换成非root用户启动。

这里把权限加上即可

chown -R elastic:elastic /home/software/kibana-7.17

然后启动    ./logstash   不报错即可。

安装logstash

下载对应的版本的logstashPast Releases of Elastic Stack Software | Elastic

上传Linux服务器,解压到/home/software/logstash-7.17/

到config文件夹下,复制一份logstash-sample.conf,命名为logstash.conf,这个是启动的默认配置文件,我这里配置了input和output,从微服务的日志文件读取。

  1. # Sample Logstash configuration for creating a simple
  2. # Beats -> Logstash -> Elasticsearch pipeline.
  3. input{
  4. file {
  5. path => "/home/software/payment/logs/payment.log" #微服务的日志文件
  6. }
  7. }
  8. output {
  9. elasticsearch {
  10. hosts => ["http://localhost:9200"]
  11. index => "logstash-%{type}-%{+YYYY.MM.dd}" #索引
  12. user => "elastic"
  13. password => "root"
  14. document_type => "%{type}"
  15. workers => 1
  16. flush_size => 20000 #传输数量 默认500
  17. idle_flush_time => 10 #传输秒数 默认1秒
  18. template_overwrite => true
  19. }
  20. }

log的流传方向就是

log日志文件----》logstash----》elasticsearch----》kibana

启动    ./kibana      可能会报错

ERROR: Pipelines YAML file is empty. Location: /home/software/logstash-7.17/config/pipelines.yml

打开这个文件/config/pipelines.yml确实全都注释了,放开一部分

  1. - pipeline.id: test
  2. pipeline.workers: 1
  3. pipeline.batch.size: 1
  4. config.string: "input { generator {} } filter { sleep { time => 1 } } output { stdout { codec => dots } }"
  5. # - pipeline.id: another_test
  6. queue.type: persisted
  7. path.config: "/tmp/logstash/*.config"

重新启动不报错,表示成功。

更多详细也可以参考官方文档:

Logstash Processing Pipeline | Logstash Reference [2.3] | Elastic

更多阅读可以参考

logstash管道pipeline配置_奔跑的_小笼包-CSDN博客_logstash pipeline配置

安装logstash7.3.2遇到的坑及解决方案_小蜜蜂1010的博客-CSDN博客_logstash7 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/792728
推荐阅读
相关标签
  

闽ICP备14008679号