[英]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.