forked from idaholab/Malcolm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
idaholab#463, initial work for allowing custom tags to be specified o…
…n hedgehog
- Loading branch information
Showing
8 changed files
with
128 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ hfsutils | |
htop | ||
hwdata | ||
javascript-common | ||
jo | ||
jq | ||
less | ||
libatomic1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2024 Battelle Energy Alliance, LLC. All rights reserved. | ||
|
||
ARKIME_DIR=${ARKIME_DIR:-"/opt/arkime"} | ||
|
||
[[ "$(uname -s)" = 'Darwin' ]] && REALPATH=grealpath || REALPATH=realpath | ||
[[ "$(uname -s)" = 'Darwin' ]] && DIRNAME=gdirname || DIRNAME=dirname | ||
if ! (type "$REALPATH" && type "$DIRNAME") > /dev/null; then | ||
echo "$(basename "${BASH_SOURCE[0]}") requires $REALPATH and $DIRNAME" | ||
exit 1 | ||
fi | ||
SCRIPT_PATH="$($DIRNAME $($REALPATH -e "${BASH_SOURCE[0]}"))" | ||
|
||
TAGS_ARGS=() | ||
if [[ -n "${MALCOLM_EXTRA_TAGS}" ]]; then | ||
while read EXTRA_TAG; do | ||
TAGS_ARGS+=( -t ) | ||
TAGS_ARGS+=( "${EXTRA_TAG}" ) | ||
done < <(echo "${MALCOLM_EXTRA_TAGS}" | tr ',' '\n') # loop over ',' separated MALCOLM_EXTRA_TAGS values | ||
fi | ||
|
||
"${ARKIME_DIR}"/bin/capture ${ARKIME_HTTPS_FLAG:-} "${TAGS_ARGS[@]}" \ | ||
-c "${SCRIPT_PATH}"/config.ini \ | ||
-o pcapDir="${PCAP_PATH}" \ | ||
-o bpf="${CAPTURE_FILTER}" \ | ||
-o dropUser=sensor \ | ||
-o dropGroup=netdev \ | ||
-o geoLite2Country="${SCRIPT_PATH}"/GeoLite2-Country.mmdb \ | ||
-o geoLite2ASN="${SCRIPT_PATH}"/GeoLite2-ASN.mmdb \ | ||
-o rirFile="${SCRIPT_PATH}"/ipv4-address-space.csv \ | ||
-o ouiFile="${SCRIPT_PATH}"/oui.txt \ | ||
-o rulesFiles="${SCRIPT_PATH}"/rules.yml \ | ||
-o parsersDir="${ARKIME_DIR}"/parsers \ | ||
-o pluginsDir="${ARKIME_DIR}"/plugins \ | ||
-o ecsEventProvider="${ARKIME_ECS_PROVIDER:-arkime}" \ | ||
-o ecsEventDataset="${ARKIME_ECS_DATASET:-session}" \ | ||
--node "${ARKIME_NODE_NAME}" \ | ||
--host "${ARKIME_NODE_HOST}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ hfsutils | |
htop | ||
hwdata | ||
javascript-common | ||
jo | ||
jq | ||
less | ||
libffi-dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters