[英]Logstash not sending data to elastic search when ran as a service
这是我的配置文件存储在/ etc / logstash / conf中
input
{
file{
path => ["PATH_OF_FILE"]
}
}
output
{
elasticsearch
{
host => "172.29.86.35"
index => "new"
}
}
这是我的elasticsearch.yaml文件内容,适用于网络和http
\# 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作为服务。问题是当我作为服务启动日志存储时,它不会向elasticsearch发送任何数据。 但是,如果我在logstash conf文件中使用相同的配置并从CLI运行logstash,则它可以正常工作。 即使是日志也不会显示任何错误。
我运行的版本是ES为1.4.3,LS为1.4.2。 系统环境是RHEL 7
我也遇到了同样的问题...当我使用-f选项执行命令时,它正常工作,但是当我启动服务时,没有任何反应,并且/ etc / log stash下的日志文件永远不会更新。
我作为临时对策做的是执行下面的命令(带&选项)
Logstash if conffile.conf &
有了这个,即使我从服务器注销也能工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.