File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ v0.3.15 Improved Humio import.
12v0.3.14 Removed a print statement.
23v0.3.13 Fixed some errors on Humio import.
34v0.3.12 Will continue to populate data after a Humio error.
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ logs into [ElasticSearch's bulk load JSON format](https://www.elastic.co/guide/e
1717- [ Command Line Options] ( #commandlineoptions )
1818- [ Requirements] ( #requirements )
1919- [ Notes] ( #notes )
20+ - [ Humio] ( #humio )
2021 - [ JSON Log Input] ( #jsonloginput )
2122 - [ Data Streams] ( #datastreams )
2223 - [ Helper Scripts] ( #helperscripts )
@@ -318,6 +319,18 @@ You will need to add -k -u elastic_user:password if you are using Elastic v8+.
318319
319320## Notes <a name =" notes " />
320321
322+ ### Humio <a name =" humio " />
323+
324+ To import your data into Humio you will need to set up a repository with the ` corelight-json ` parser. Obtain
325+ the ingest token for the repository and you can import your data with a command such as:
326+
327+ ```
328+ python3 zeek2es.py -s -b --humio http://localhost:8080 b005bf74-1ed3-4871-904f-9460a4687202 http.log
329+ ```
330+
331+ The URL should be in the format of: ` http://yourserver:8080 ` , as the rest of the path is added by the
332+ ` zeek2es.py ` script automatically for you.
333+
321334### JSON Log Input <a name =" jsonloginput " />
322335
323336Since Zeek JSON logs do not have type information like the ASCII TSV versions, only limited type information
Original file line number Diff line number Diff line change @@ -445,7 +445,14 @@ def main(**args):
445445 # Prepare the output and increment counters
446446 if args ['humio' ]:
447447 d ['ts' ] = d ['ts' ] + "Z"
448- d ["_write_ts" ] = d ["ts" ]
448+ if "_write_ts" in d :
449+ d ['_write_ts' ] = d ['_write_ts' ] + "Z"
450+ else :
451+ d ["_write_ts" ] = d ["ts" ]
452+ if "_path" not in d :
453+ d ["_path" ] = zeek_log_path
454+ if (len (args ['name' ].strip ()) > 0 ):
455+ d ["_system_name" ] = args ['name' ].strip ()
449456 d ["@timestamp" ] = d ["ts" ]
450457 outstring += json .dumps (d )+ "\n "
451458 n += 1
You can’t perform that action at this time.
0 commit comments