Hi.
I’m having problems with a pipeline rule.
The rule is ;
rule “replace Graylog Timestamp for log messages”
when
has_field(“c-ip”)
then
let new_timestamp = parse_date(to_string($message.log_timestamp), “yyyy-MM-dd HH:mm:ss”);
set_field(“timestamp”, new_timestamp);
end
when
(has_field(“tags”) AND (to_string($message.tags) == “gra”))
then
let new_timestamp = parse_date(to_string($message.log_timestamp), “yyyy-MM-dd HH:mm:sss,SSS”);
set_field(“timestamp”, new_timestamp);
end
The first part of the works perfectly and rewrites the timestamp field for an IIS log record.
The second part doesn’t rewrite the timestamp for a non IIS log record.
The log record in question is;
EventReceivedTime
2018-08-31 09:45:52
FileName
d:\tablogs\jvgrs security\20180831.01.Security.RAWQGRA110V.log
SourceModuleName
5ac6e906e3397903966e288b
SourceModuleType
im_file
SourceName
ozchase
collector_node_id
rawqgra110v
file
20180831.01.security.rawqgra110v.log
level
6
log_timestamp
2018-08-31 09:45:51,908
message
2018-08-31 09:45:51,908 [19] INFO UNK0013O SecurityServiceServer - JVGRS.Security.Wcf.SecurityService/GetPublicKey End
size
119
source
rawqgra110v.rwwaq.com.au
tags
gra
timestamp
2018-08-31T01:45:52.000Z
Any help would be most appreciated.
Regards,
Harry W.