how do I display in the logstash all the contents in a .txt file?
this is the screenshot of my txt
and this is my logstash config
input {
file {
#type => "doc"
#path => "/home/wsagiva/Desktop/logs/log.txt"
path => "/home/ip.txt"
start_position => "beginning"
#codec => "doc"
sincedb_path => "/dev/null"
#type => ""
}
}
filter {
grok {
match => [ "message", "%{COMBINEDAPACHELOG}" ]
}
}
output {
elasticsearch {
hosts => ["192.168.1.201:9200"]
# index => "ip"
}
stdout {
codec => "rubydebug"
}
}
i want to add the ip address from txt file to field of logstash, and i want to visualize it.