I have an event flow that is processing Windows logs forwarded via syslog, parsing them, and sending them to ArcSight via the CEF codec. The list of extended fields to be included in the CEF message is variable depending on the event ID, and the list of CEF extended fields to be mapped is stored in the event field cef_fields
output {
if [type] == "domain_controller" {
udp {
id => "arcsight_connector"
host => "1.1.1.1"
port => 514
codec => cef {
delimiter => " "
vendor => "%{device_vendor}"
product => "%{device_product}"
version => "%{device_version}"
severity => "%{device_severity}"
signature => "%{device_signature}"
name => "%{os_event_description}"
fields => [cef_fields]
}
}
}
}
The output message does not have the expected key/value pairs but instead is just a print of the cef_fields
event field.
CEF:0|Microsoft|Microsoft Windows|1.0|Microsoft-Windows-Security-Auditing:4624|An account was successfully logged on|0|ceffields=["dvchost","deviceProcessName","cs5","cs5Label","cs1","cs1Label","cn1","cn1Label","shost","src","spt","duser","dntdom","duid","cs6","cs6Label","dproc","cs3","cs3Label","suser","sntdom","suid"]
A quick examination of the codec code makes me believe this should work.
values = @fields.map {|fieldname| get_value(fieldname, event)}.compact.join(" ")
Is there a better way to pass the cef_fields
list?