Skip to content

Commit

Permalink
allow blank arkime node name for uploaded capture as it will default …
Browse files Browse the repository at this point in the history
…to hostname (idaholab#321)
  • Loading branch information
mmguero committed Jan 10, 2024
1 parent 0228de1 commit 45f8e96
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions shared/bin/pcap_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,26 @@ def arkimeCaptureFileWorker(arkimeWorkerArgs):
# if this is an uploaded PCAP (not captured "live"")
# append -upload to the node name used (which originates from PCAP_NODE_NAME)
tmpNodeName = fileInfo[FILE_INFO_DICT_NODE] if (FILE_INFO_DICT_NODE in fileInfo) else nodeName
if (not (FILE_INFO_DICT_LIVE in fileInfo)) or (not fileInfo[FILE_INFO_DICT_LIVE]):
if tmpNodeName and (
(not (FILE_INFO_DICT_LIVE in fileInfo)) or (not fileInfo[FILE_INFO_DICT_LIVE])
):
tmpNodeName = tmpNodeName + '-upload'

# put together arkime execution command
cmd = [
arkimeBin,
'--quiet',
'--insecure',
'--node',
tmpNodeName,
'-o',
f'ecsEventProvider={arkimeProvider}',
'-o',
f'ecsEventDataset={arkimeDataset}',
'-r',
fileInfo[FILE_INFO_DICT_NAME],
]
if tmpNodeName:
cmd.append('--node')
cmd.append(tmpNodeName)
if nodeHost:
cmd.append('--host')
cmd.append(nodeHost)
Expand Down

0 comments on commit 45f8e96

Please sign in to comment.