首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >logstash未运行配置

logstash未运行配置
EN

Stack Overflow用户
提问于 2019-12-18 15:28:45
回答 1查看 193关注 0票数 0

我在客户端使用filebeat >在服务器端使用logstash >在服务器端使用elasticsearch

客户端上的filebeat通过发送文件可以正常工作,但我在logstash返回时所做的配置

失败

代码语言:javascript
复制
[WARN ] 2019-12-18 14:53:30.987 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[FATAL] 2019-12-18 14:53:31.341 [LogStash::Runner] 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.
[ERROR] 2019-12-18 14:53:31.364 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

这是我的配置文件

代码语言:javascript
复制
input {
 beats {
  port =>5044
}
}
filter {
        grok    {
                 match => { "message" =>"%{TIMESTAMP_ISO8601:timestamp}] %{WORD:test}\[%{NUMBER:nom}]\[%{DATA:tes}\] %{DATA:module_name}\: %{WORD:method}%{GREEDYDATA:log_message}" }
                }
        }
output {
         elasticsearch
        {
        hosts => "127.0.0.1:9200"
        index=>"test_log_pbx"
}
}

运行我的logstash配置的代码

代码语言:javascript
复制
/usr/share/logstash/bin/logstash -f logstash.conf

当我运行configtest时,它返回

代码语言:javascript
复制
Thread.exclusive is deprecated, use Thread::Mutex
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[WARN ] 2019-12-18 14:59:53.300 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2019-12-18 14:59:56.566 [LogStash::Runner] Reflections - Reflections took 139 ms to scan 1 urls, producing 20 keys and 40 values
Configuration OK
[INFO ] 2019-12-18 14:59:57.923 [LogStash::Runner] runner - Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash

请帮帮我,我不知道怎么回事

EN

回答 1

Stack Overflow用户

发布于 2021-01-16 01:49:28

logstash实例已经在运行,所以您不能运行另一个instance.If,您应该停止该服务。如果要运行多个实例,则应修改pipelines.yml

如果你想了解更多关于pipelines.yml的信息,我把链接放在下面。

https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59387299

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档