Files
securityonion/salt/logstash/files/conf.d/1125_preprocess_bro_modbus.conf
2018-02-05 12:36:27 -05:00

35 lines
892 B
Plaintext

# Author: Wes Lambert
# wlambertts@gmail.com
#
# Adapted from existing filters provided by Justin Henderson
#
# Last Update: 12/14/2017
#
# This conf file is based on accepting logs for modbus.log from Bro systems
#
# Parse using csv filter
filter {
if [type] == "bro_modbus" {
# This is the initial parsing of the log
mutate {
gsub => [ "message", "[\"']", "" ]
}
csv {
columns => ["timestamp","uid","source_ip","source_port","destination_ip","destination_port","function","exception"]
separator => " "
}
}
}
# Parse using grok
#filter {
# if [type] == "bro_modbus" {
# grok {
# match => [ "message", "(?<timestamp>(.*?))\t(?<uid>(.*?))\t(?<source_ip>(.*?))\t(?<source_port>(.*?))\t(?<destination_ip>(.*?))\t(?<destination_port>(.*?))\t(?<func>(.*?))\t(?<exception>(.*?))$" ]
# }
#mutate {
#add_tag => [ "conf_file_1125"]
#}
# }
#}