Hey guys,
Is it possible to add a field for the file path?
input{
file{
path => [ "/bitnami/jenkins/jenkins_home/jobs/create-machine/builds/**/log", "/bitnami/jenkins/jenkins_home/jobs/delete-machine/builds/**/log" ]
add_field => { "component" => "Jenkins_Jobs" }
add_field => { "level" => "INFO" }
add_field => { "module" => "JOB" }
# Any line not starting with a timestamp should be merged with the previous line
codec => multiline {
# Regex for iso datetime
pattern => "\[(\d{4}-\d{2}-\d{2})[A-Z]+(\d{2}:\d{2}:\d{2}).([0-9+-:]+)Z\]"
negate => true
what => "previous"
}
}
}
filter {
if [component] == "Jenkins_Jobs" {
dissect {
mapping => {
"message" => "%{timestamp} %{message}"
}
}
}
else if ("_dissectfailure" in [tags]) {
drop { }
}
}