运行多个实例时,logstash无法启动-path.data设置 [英] logstash could not be started when running multiple instances - path.data setting

查看:3977
本文介绍了运行多个实例时,logstash无法启动-path.data设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是ELK堆栈内部的新手

Hi i am new to the internals of ELK stack

在后台运行logstash进程,当它选择了匹配的文件模式时,如下所示

running a logstash process in background, and when it got picked up the matching file pattern, it says as in below

我想在这里了解path.data选项的重要性,请帮帮我

i want to understand here what is the importance of path.data option, Please help me out

[FATAL][logstash.runner] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.

Logstash及其插件将

推荐答案

path.data目录用于存储数据的任何持久性需求,并且对于所运行的每个实例,该目录都应有所不同,因为Logstash不允许多个实例共享同一path.data.

path.data directory is used by Logstash and its plugins for any persistent needs to store data, and it need to be different for each instance you are running, since Logstash does not allow multiple instances to share the same path.data.

默认情况下,其值设置为LOGSTASH_HOME/data,在debian和rpm下,其值设置为/usr/share/logstash/data,除非明确指定,否则它将自动分配给第一个logstash实例.

By default its value is set to, LOGSTASH_HOME/data, which, under debian and rpm is /usr/share/logstash/data, and it is automatically assigned to first logstash instance unless explicitly specified.

如果要运行多个logstash实例,则需要通过命令定义path.data

If you want to run multiple logstash instances, you need to define the path.data either by command,

bin/logstash -f <config_file.conf> --path.data PATH

(确保目录可写)

或在每个实例的/etc/logstash/下的logstash.yml文件中指定.

or specify in logstash.yml file under /etc/logstash/ for each instance.

这篇关于运行多个实例时,logstash无法启动-path.data设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆