Issue #885: so-elastic-clear not removing so-* indices

This commit is contained in:
bryant-treacle
2020-06-24 18:40:11 +00:00
parent 0849014b24
commit 08220e3330
2 changed files with 26 additions and 4 deletions

View File

@@ -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

0
test.test Normal file
View File