gpt4 book ai didi

elasticsearch - 作为服务运行时,Logstash 不将数据发送到 Elasticsearch

转载 作者:行者123 更新时间:2023-12-04 03:45:33 25 4
gpt4 key购买 nike

这是我存储在/etc/logstash/conf 的配置文件

input
{
file{
path => ["PATH_OF_FILE"]
}
}

output
{
elasticsearch
{
host => "172.29.86.35"
index => "new"
}
}

这是我的网络和http的elasticsearch.yaml文件内容

\# Set the bind address specifically (IPv4 or IPv6):

\#network.bind_host: 172.29.86.35

\# Set the address other nodes will use to communicate with this node. If not
\# set, it is automatically derived. It must point to an actual IP address.
\#network.publish_host: 192.168.0.1

\# Set both 'bind_host' and 'publish_host':
network.host: 172.29.86.35

\# Set a custom port for the node to node communication (9300 by default):
\#transport.tcp.port: 9300

\# Enable compression for all communication between nodes (disabled by default):

\#transport.tcp.compress: true

\# Set a custom port to listen for HTTP traffic:
\#http.port: 9200

我将 elasticsearch 和 logstash 作为服务运行。问题是当我将 log stash 作为服务启动时,它不会向 elasticsearch 发送任何数据。但是,如果我在 logstash conf 文件中使用相同的配置并从 CLI 运行 logstash,它工作得很好。甚至日志也没有显示任何错误。

我运行的版本是 1.4.3 for ES 和 1.4.2 for LS。系统环境为RHEL 7

最佳答案

我也遇到了同样的问题...当我使用 -f 选项执行命令时,它正常工作,但是当我启动服务时,没有任何反应,并且/etc/log stash 下的日志文件从未更新。

我作为临时对策所做的是执行下面的命令(带&选项)

Logstash if conffile.conf &

有了这个,即使我从服务器注销,它也能正常工作。

关于elasticsearch - 作为服务运行时,Logstash 不将数据发送到 Elasticsearch ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28597924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com