i am facing same issue, and tried to use your solution with adding the filter. but again got the error as below:
Trouble sending GELF event {:gelf_event=>{"short_message"=>["", "%{Message}"], "full_message"=>",%{M........"path"=>"/root/Desktop/Graylog/test.txt", "host"=>"localhost.localdomain", "type"=>"grayLog"}, "severity"]}>>, :error=>#SocketError: send: name or service not known>, :level=:warn}
I have omitted the log and only shown the relevant things.
Can u please help me with this.
My config is
input {
file {
path => "/root/Desktop/Graylog/test.log"
start_position => "beginning"
type => "grayLog"
sincedb_path => "/dev/null"
}
}
filter {
if [type] == "grayLog" {
mutate {
add_field => {"message" => "%{Message}"}
}
}
}
output {
gelf {
host => ["127.0.0.1:9000"]
}
}
using logstash v2.2 with
Graylog 1.3
I am a newbie in linux environment and tools. kindly help me.