Hi,
Would appreciate a pointer with regard to using multiple file inputs.
This works:-
input {
file {
path => [
"//server_1/Logs/*",
"//server_2/Logs/*",
"//server_2/Logs/*",
"//server_2/Logs/*",
"//server_2/Logs/*"
]
start_position => "beginning"
sincedb_path => "E:/LS/logstash-2.0.0/.sincedb"
}
} # END INPUT
I am collecting logs from different locations and processing them in a single LS config file.
The downside of this is that every LS document produced ends up with the "host" value set as the LS machine. I need the host value to be the remote machine which created the log in the first place.
Whats best practice here? Should I have multiple file inputs (one per path) and add a type for each message then do a:-
if [type] == "server_1" {
add_field => { "host_server" => "server_1_hostname" }
}
Or is there a more efficient way? Would I need to have a .sincedb defined per file input?
Would be grateful for a steer on best practice for monitoring multiple paths, keeping the host values separate and managing .sincedb(s)
Thanks