If it is still relevant, you can exports log with a Splunk format to graylog and configure pipeline:
Pipeline Stages:
Stage 0:
########################
#
# extract fields (format: Splunk)
#
rule "cp_extract_fields"
when
has_field("message")
then
let msg = to_string($message.message);
set_fields(key_value(
value: msg,
delimiters: "|",
kv_delimiters: "="
));
end
Stage 1 (optional):
########################
#
# dns lookup field(src) for local addresses and set_field src_dns_ptr
#
rule "cp_dns_lookup_src"
when
has_field("src") AND
is_ip(to_ip($message.src)) == true AND
(cidr_match("10.0.0.0/8", to_ip($message.src)) OR cidr_match("192.168.0.0/16", to_ip($message.src)) OR cidr_match("172.16.0.0/12", to_ip($message.src)))
//has_field("src")
then
let src_dns_ptr = lookup_value("cp-dns-ptr", $message.src, "debug");
set_field("src_dns_ptr", src_dns_ptr);
end
########################
#
# dns lookup field(dst) for local addresses and set_field dst_dns_ptr
#
rule "cp_dns_lookup_dst"
when
has_field("dst") AND
is_ip(to_ip($message.dst)) == true AND
(cidr_match("10.0.0.0/8", to_ip($message.dst)) OR cidr_match("192.168.0.0/16", to_ip($message.dst)) OR cidr_match("172.16.0.0/12", to_ip($message.dst)))
//has_field("dst")
then
let dst_dns_ptr = lookup_value("cp-dns-ptr", $message.dst, "debug");
set_field("dst_dns_ptr", dst_dns_ptr);
end
########################
#
# set_field direction="external_conns" if src ip not local
#
rule "cp_check_external_conns"
when
has_field("src") AND
is_ip(to_ip($message.src)) == true AND NOT
(cidr_match("10.0.0.0/8", to_ip($message.src)) OR cidr_match("192.168.0.0/16", to_ip($message.src)) OR cidr_match("172.16.0.0/12", to_ip($message.src)) OR cidr_match("0.0.0.0/32", to_ip($message.src)))
//has_field("src")
then
//let src_dns_ptr = lookup_value("cp-dns-ptr", $message.src, "debug");
set_field("direction", "external_conns");
end
########################
#
# convert time and set_field time_converted
#
rule "cp_convert_field_time"
when
has_field("time")
then
let time_converted = parse_unix_milliseconds(to_long(concat(to_string($message.time), "000")), "Europe/Moscow")
;
set_field("time_converted", time_converted);
end
########################
#
# set_field rule_name="not_defined" if missed rule_name
#
rule "cp_blank_rule_name"
when
has_field("rule") AND NOT has_field("rule_name")
//has_field("src")
then
set_field("rule_name", "not_defined");
end