2017-08-30 3 views
0

こんにちは私は弾性スタックを使用して自動ロギングを行っています。私はを持っています。パスからログを読み込み、出力はポート5044でlogstashに設定されています。 logstashの設定では、入力を受けてが出力され、localhost:9200に出力がプッシュされます。問題は私がそれを働かせることができない、何が起こっているのか分かりません。下記のファイルは、以下のとおりです。ELBを使用してログを記録するためにFilebeatをlogstashに接続することができません

マイfilebeat.ymlパス:etc/filebeat/filebeat.yml

#=========================== Filebeat prospectors ============================= 

filebeat.prospectors: 

# Each - is a prospector. Most options can be set at the prospector level, so 
# you can use different prospectors for various configurations. 
# Below are the prospector specific configurations. 

- input_type: log 

# Paths that should be crawled and fetched. Glob based paths. 
paths: 
- /mnt/vol1/autosuggest/logs/*.log 
#- c:\programdata\elasticsearch\logs\* 
<other commented stuff> 
#----------------------------- Logstash output -------------------------------- 
output.logstash: 
# The Logstash hosts 
hosts: ["10.10.XX.XX:5044"] 

# Optional SSL. By default is off. 
<other commented stuff> 

マイlogstash.ymlパス:etc/logstash/logstash.yml

<other commented stuff> 
path.data: /var/lib/logstash 
<other commented stuff> 
path.config: /etc/logstash/conf.d 
<other commented stuff> 

# ------------ Metrics Settings -------------- 
# 
# Bind address for the metrics REST endpoint 
# 
http.host: "10.10.XX.XX" 
# 
# Bind port for the metrics REST endpoint, this option also accept a range 
# (9600-9700) and logstash will pick up the first available ports. 
# 
# http.port: 9600-9700 
<other commented stuff> 
path.logs: /var/log/logstash 
<other commented stuff> 

マイlogpipeline30aug.configファイルパス:/usr/share/logstash

input { 
    beats { 
    port => 5044 
    } 
} 

filter { 
    grok { 
match => { "message" => "\A%{TIMESTAMP_ISO8601:timestamp}%{SPACE}%{WORD:var0}%{SPACE}%{NOTSPACE}%{SPACE}(?<searchinfo>[^#]*)#(?<username>[^#]*)#(?<searchQuery>[^#]*)#(?<latitude>[^#]*)#(?<longitude>[^#]*)#(?<client_ip>[^#]*)#(?<responseTime>[^#]*)" } 
    } 
} 

output { 
    elasticsearch { 
     hosts => ["http://localhost:9200"] 
     index => "logstash30aug2017" 
     document_type => "log" 
    } 
} 

ご注意:すべてのIPと同じマシンにインストールされているfilebeat Elasticsearch、logstash、:10.10.XX.XXと私はファイアウォールをチェックしましたが、それは確かに問題ではありません。

logstash、filebeatサービスがすべて実行されていることを確認しました。 Filebeatは設定時にデータをelasticsearchにプッシュでき、logstashは設定時にデータをelasticsearchにプッシュすることができます。私は、プロセスが問題である実行していますか


は、多分それは私がそれを起動する /usr/share/logstashbin/logstash -f logpipeline30aug.configを行い、その後、私はルートディレクトリから /etc/init.d/filebeat startを行う ...です。

注意してください:?誰か助けてくださいすることができの書式が問題

をフォーマットStackOverflowのが原因行うことができますか私は3日以来、すべてを試してきました。私も文書を見てきました。

答えて

1

あなたのfilebeat.ymlは無効に見えます。一般的に

output.logstash: 
    hosts: ["10.10.XX.XX:5044"] 

、彼らはOKかどうかを確認するために設定ファイルの正しさを確認してください。

は、出力部には、インデントを欠いています。

例えば、filebeatのために、あなたが実行することができます:あなたはすべてのエラーを持っている場合は

filebeat -c /etc/filebeat/filebeat.yml -configtest 

は、それはあなたがそれを修正することができますので、そのエラーが何であるかを説明しています。

あなたはそれがあります

+0

、他のELKサービスのための同様のアプローチを使用することができ、それはfilebeatの出力は何stackoverflowの書式設定の問題 –

+0

ですか? – whites11

+0

何も起こらない –

関連する問題