Closed philrz closed 8 months ago
The kind of shaping config output from this Zeek script is no longer supported in Zed, so it seems unlikely we'd ever go back and add this enhancement. While I've found this script still sometimes useful for getting a quick summary of additional default log types added in new Zeek versions, I've grown accustomed to performing the minimal, manual surgery to graft on deeply nested fields in modern Zed type definitions. Therefore I'm going to close out this issue.
This is a known limitation that is documented in
print-types.zeek
, but hadn't made its way over into this bug tracking system. The short summary is that the print-types script doesn't handle more than two levels of nesting. I had initially run into this with the openflow log, and here @philrz notes something similar with the smb_cmd log.Repro is with the
print-types.zeek
script in Brim's fork of Zeek at commite35de70
andzq
commit0397e42
.As of Zeek release
v3.1.2
, thesmb_cmd.log
is not generated by default. However, it can be brought to life by adding this line tolocal.zeek
on a "stock" config:Now we generate a typing config (attached):
If I attempt to use it with
zq
commit0397e42
, it is rejected.@henridf and I had discussed this at some point in the past at which point we noted that the cause of the error seems to lie within the
referenced_file
portion, as if I remove this it works:The comments in
print-types.zeek
imply there's limits to how it deals with recursion, so perhaps the nested records likeid
insidereferenced_file
are a source of trouble.Since this particular Zeek log isn't even enabled as default, this probably needn't be a high priority. However, since this same symptom might be lurking among other Zeek logs that aren't on by default, we may want to give it some consideration before too long, since use of
zq
with Zeek JSON is likely to start soon, and we expect to guide users through runningprint-types.zeek
as needed to generate their own custom schemas.