Make Syslog analyzer accept messages that omit Priority

Essentially, it will now process/parse priority values if they are
there, or else just accept whatever remaining data/text is there as the
syslog message.  Reasoning is that there's syslog producers out there
that may have simply forgotten/neglected to send the priority value
and technically won't conform to what the standard says, though we can
infer the intent (some syslog consumers already may do similarly, but
I didn't verify).
This commit is contained in:
Jon Siwek 2019-03-14 18:47:32 -07:00
parent 158313875c
commit be7110f6c0
7 changed files with 55 additions and 13 deletions

View file

@ -0,0 +1,10 @@
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path syslog
#open 2019-03-15-01-41-39
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto facility severity message
#types time string addr port addr port enum string string string
1552584410.781231 CHhAvVGS1DHFjwGM9 192.168.2.118 60786 192.168.2.21 514 udp UNSPECIFIED UNSPECIFIED This is not really a syslog message #173538 1552584410.781186
#close 2019-03-15-01-41-39

Binary file not shown.

View file

@ -0,0 +1,4 @@
# @TEST-EXEC: bro -r $TRACES/syslog-missing-pri.trace %INPUT
# @TEST-EXEC: btest-diff syslog.log
@load base/protocols/syslog