I am trying to get the logs from logstash and send it to elasticsearch for visualising the logs using kibana but I am getting an error while running this code from logstash\bin directory
logstash -f logstashpipline.conf
The error says
Error: Could not find or load main class MyPC\Desktop\logstash\logstash-core\lib\jars\animal-sniffer-annotations-1.14.jar;
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) Client VM (build 25.161-b12, mixed mode, sharing)
This is my code:
input {
file {
path => "C:\xampp\apache\logs\access.log"
type => "apache_access"
start_position => "beginning"
}
file {
path => "C:\xampp\apache\logs\error.log"
type => "apache_error"
start_position => "beginning"
}
}
output {
elasticsearch {
hosts => "localhost:9200"
index => "apache_logs"
document_type => "system_logs"
}
stdout { }
}