Hi
I need some help running this logstash config, when running in ubuntu it keeps on complaining about line 47 where it expected # or => but i can't see the problem with the below. Any help will be appreciated.
input {
file {
path => "<tsv_moniter>/*.csv"
type => "o365_tsv"
start_position => "beginning"
}
file {
path => "home/ct/Documents/office/*.csv"
type => "o365_csv"
start_position => "beginning"
}
}
filter {
if ([type] == "o365_tsv") {
csv {
columns => ["CreationDate", "UserIds", "Operations", "AuditData"]
skip_header => "true"
add_tag => [ "o365_csv_log" ]
# Insert a literal tab for a separator
separator => " "
}
date {
match => [ "CreationDate", "ISO8601"]
}
json {
# Need to parse out embedded JSON
source => "AuditData"
}
geoip {
database => "home/ct/Documents/maximind/GeoLite2-Country.mmdb"
source => "ClientIP"
target => "client_geo"
}
}
if ([type] == "o365_csv") {
csv {
columns => ["PSComputerName", "RunspaceId", "PSShowComputerName", "RecordType", "CreationDate", "UserIds", "Operations", "AuditData", "ResultIndex", "ResultCount", "Identity", "IsValid", "ObjectState"]
skip_header => "true"
# Need to drop that pesky second header
if ([message] =~ /^#/) {
drop {}
}
}
date {
match => [ "CreationDate", "ISO8601" ]
}
# Need to parse out embedded JSON
json {
source => "AuditData"
}
geoip {
database => "home/ct/Documents/maximind/GeoLite2-Country.mmdb"
source => "ClientIP"
target => "client_geo"
}
}
}
output {
elasticsearch {
# Change me to reflect your Elastic server
hosts => ["localhost:5601"]
index => "o365_logs"
}
}