我有我的logstash進口下列配置幾個CSV文件:即使在Windows上配置正常時,如何調試logstash?
input {
file {
path => [
"C:\Data\Archive_ATS_L1\2016-10-08-00-00_to_2016-10-09-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv",
"C:\Data\Archive_ATS_L1\2016-10-09-00-00_to_2016-10-10-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv",
"C:\Data\Archive_ATS_L1\2016-10-10-00-00_to_2016-10-11-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv",
"C:\Data\Archive_ATS_L1\2016-10-11-00-00_to_2016-10-12-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv",
"C:\Data\Archive_ATS_L1\2016-10-12-00-00_to_2016-10-13-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv",
"C:\Data\Archive_ATS_L1\2016-10-13-00-00_to_2016-10-14-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv",
"C:\Data\Archive_ATS_L1\2016-10-14-00-00_to_2016-10-15-00-00\S2KHistorian\Historian\S2KEventMsg_Table.csv"
]
start_position => "beginning"
}
}
filter {
csv {
separator => ","
columns => ["MessageCode","SourceGuid","DateTimeGenerated","Code1","Code2","Code3","Code4","LanguageCode", "AlarmSeverity", "Message", "Guid1", "Guid2", "Guid3", "Guid4", "MessageOrigin", "RequestId", "Bool1", "Bool2", "Bool3", "Bool4", "Bool5", "Bool6", "Bool7", "Bool8", "Code5", "Code6", "Bool9", "Bool10", "Bool11", "Code7"]
}
}
output {
elasticsearch {
action => "index"
hosts => "localhost"
index => "S2K"
workers => 1
}
stdout {}
}
我啓動logstash使用此命令行:
logstash.bat –f ..\conf\logstash.conf --verbose
通常我查看通過進口到Elasticsearch的數據安慰。但是我這次得到的只是一句話,說「管道主要開始」,並保持這種狀態。
如何從logstash檢查數據是否已導入?我嘗試使用Elasticsearch運行:curl http://localhost:9200/_aliases
這通常會給出索引列表。但是我在這個配置中的索引(稱爲S2K)沒有列出。
我是新來的ELK,我該如何檢查logstash是否在做這件事?請注意,我正在使用Windows 7.
可以看看這個https://discuss.elastic.co/t/logstash-not-reading-file-in-windows/41723 – baudsp
我認爲這個問題可能是你已經用logstash讀取了這些文件,必須更改sincedb文件的路徑,該文件保存logstash已經讀取文件的位置cf https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file -sincedb_path – baudsp