mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Issue #885: so-elastic-clear not removing so-* indices
This commit is contained in:
@@ -14,6 +14,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.. /usr/sbin/so-common
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.. /usr/sbin/so-common
|
||||||
|
{%- set MASTERIP = salt['pillar.get']('static:masterip', '') -%}
|
||||||
|
. /usr/sbin/so-common
|
||||||
|
|
||||||
SKIP=0
|
SKIP=0
|
||||||
#########################################
|
#########################################
|
||||||
@@ -64,13 +66,24 @@ fi
|
|||||||
# Check to see if Logstash/Filebeat are running
|
# Check to see if Logstash/Filebeat are running
|
||||||
LS_ENABLED=$(so-status | grep logstash)
|
LS_ENABLED=$(so-status | grep logstash)
|
||||||
FB_ENABLED=$(so-status | grep filebeat)
|
FB_ENABLED=$(so-status | grep filebeat)
|
||||||
|
EA_ENABLED=$(so-status | grep elastalert)
|
||||||
|
|
||||||
if [ ! -z "$FB_ENABLED" ]; then
|
if [ ! -z "$FB_ENABLED" ]; then
|
||||||
|
|
||||||
/usr/sbin/so-filebeat-stop
|
/usr/sbin/so-filebeat-stop
|
||||||
|
|
||||||
elif [ ! -z "$LS_ENABLED" ]; then
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$LS_ENABLED" ]; then
|
||||||
|
|
||||||
/usr/sbin/so-logstash-stop
|
/usr/sbin/so-logstash-stop
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$EA_ENABLED" ]; then
|
||||||
|
|
||||||
|
/usr/sbin/so-elastalert-stop
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete data
|
# Delete data
|
||||||
@@ -87,8 +100,17 @@ if [ ! -z "$FB_ENABLED" ]; then
|
|||||||
|
|
||||||
/usr/sbin/so-filebeat-start
|
/usr/sbin/so-filebeat-start
|
||||||
|
|
||||||
elif [ ! -z "$LS_ENABLED" ]; then
|
fi
|
||||||
|
|
||||||
/usr/sbin/so-logstash-start
|
if [ ! -z "$LS_ENABLED" ]; then
|
||||||
|
|
||||||
|
/usr/sbin/so-logstash-start
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$EA_ENABLED" ]; then
|
||||||
|
|
||||||
|
/usr/sbin/so-elastalert-start
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user