I am new to Elastic stack and trying to see the different logs under different Kiban indexes. for an example, I am trying to place the logs from my dhcp server under a index called "DHCP". My logstash config is as below, but I am not seeing the new index created for DHCP and still all the logs are going under the default filebeat index.
''''''''''''''''''''''''''''''''''''
input {
beats {
port => 5044
}
}
output {
if [log.file.path] in [C:\Windows\system32\dhcp*]{
elasticsearch {
hosts => ["http://localhost:9200"]
index => "DHCP-%{+YYYY.MM.dd}"
user => "CCCCCC"
password => "CCCCCC"
}
}else {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
user => "CCCCCC"
password => "XXXXXXXXX"
}
}
}
''''''''''''''''''''''''''''''
if [log] [file] [path] in [C:\Windows\system32\dhcp*]{
elasticsearch {
hosts => ["http://localhost:9200"]
index => "DHCP-%{+YYYY.MM.dd}"
user => "CCCCCC"
password => "CCCCCC"
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.