mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Use explicit path to so-elasticsearch-query
This commit is contained in:
@@ -55,7 +55,7 @@ while overlimit; do
|
|||||||
# First, get the list of open indices using _cat/indices?h=index,status | grep open | awk '{print $1}'.
|
# First, get the list of open indices using _cat/indices?h=index,status | grep open | awk '{print $1}'.
|
||||||
# Next, filter out any so-case indices and only select the remaining logstash-, so-, or .ds-logs- indices.
|
# Next, filter out any so-case indices and only select the remaining logstash-, so-, or .ds-logs- indices.
|
||||||
# Then, sort by date by telling sort to use hyphen as delimiter and sort on the third field.
|
# Then, sort by date by telling sort to use hyphen as delimiter and sort on the third field.
|
||||||
OPEN_INDICES=$(so-elasticsearch-query _cat/indices?h=index,status | grep open | awk '{print $1}' | grep -v "so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3)
|
OPEN_INDICES=$(/usr/sbin/so-elasticsearch-query _cat/indices?h=index,status | grep open | awk '{print $1}' | grep -v "so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3)
|
||||||
#OLDEST_OPEN_INDEX=$(so-elasticsearch-query _cat/indices?h=index,status | grep open | awk '{print $1}' | grep -v "so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3 | head -1)
|
#OLDEST_OPEN_INDEX=$(so-elasticsearch-query _cat/indices?h=index,status | grep open | awk '{print $1}' | grep -v "so-case" | grep -E "(logstash-|so-|.ds-logs-)" | sort -t- -k3 | head -1)
|
||||||
|
|
||||||
for OPEN_INDEX in ${OPEN_INDICES}; do
|
for OPEN_INDEX in ${OPEN_INDICES}; do
|
||||||
|
|||||||
Reference in New Issue
Block a user