Я нахожусь на windows, я перехожу в каталог logsta sh и запускаю его с помощью
.\bin\logstash.bat -f ..\simple-config.conf
Мой файл .conf:
input {
file {
type=>"users-ws-log"
path=>"C:/Users/nsun/Desktop/Education/Spring_Micro/workspace/PhotoAppApiUsers/users-ws.log"
}
file {
type=>"albums-ws-log"
path=>"C:/Users/nsun/Desktop/Education/Spring_Micro/workspace/PhotoAppApiAlbums/albums-ws.log"
}
}
output {
if[type] == "users-ws-log" {
elasticsearch {
hosts => ["localhost:9200"]
index => "users-ws-%{+YYYY.MM.dd}"
}
} else if[type] == "albums-ws-log" {
elasticsearch {
hosts => ["localhost:9200"]
index => "albums-ws-%{+YYYY.MM.dd}"
}
}
stdout { codec => rubydebug }
}
Я пробовал путь с \, /, \, но ни один из них не решает проблему. Я видел, как кто-то еще говорил, что каждая строка должна заканчиваться новой строкой, поэтому я добавил возврат каретки к последней строке, и это не решило проблему.
Вывод консоли:
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules (file:/C:/Users/nsun/Desktop/Misc_Programs/ELK/logstash-7.8.0/logstash-core/lib/jars/jruby-complete-9.2.11.1.jar) to field java.io.Console.cs
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Sending Logstash logs to C:/Users/nsun/Desktop/Misc_Programs/ELK/logstash-7.8.0/logs which is now configured via log4j2.properties
[2020-06-19T19:27:35,594][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-06-19T19:27:35,676][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.8.0", "jruby.version"=>"jruby 9.2.11.1 (2.5.7) 2020-03-25 b1f55b1a40 Java HotSpot(TM) 64-Bit Server VM 13.0.2+8 on 13.0.2+8 +indy +jit [mswin32-x86_64]"}
[2020-06-19T19:27:36,050][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"C:/Users/nsun/Desktop/Misc_Programs/ELK/simple-config.conf"}
[2020-06-19T19:27:36,073][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2020-06-19T19:27:36,492][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2020-06-19T19:27:41,167][INFO ][logstash.runner ] Logstash shut down.
Оцените любые советы.