Skip to content

Commit 88e37d8

Browse files
committed
Made it even more reliable
1 parent 2d19dc9 commit 88e37d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jobs/ingestor_syslog/templates/bin/ingestor_syslog_ctl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ case $1 in
9494
echo "} #close filters" >> ${JOB_DIR}/config/logstash.conf
9595

9696
# clear persistent queue if the upgrade failed last run
97-
if tail -80 $LOG_DIR/$JOB_NAME.stdout.log | grep 'QueueUpgrade - Logstash was unable to upgrade your persistent queue data' >/dev/null ; then
97+
if cat $LOG_DIR/$JOB_NAME.stdout.log | grep -a 'QueueUpgrade - Logstash was unable to upgrade your persistent queue data' >/dev/null ; then
9898
mkdir ${STORE_DIR}/oldqueue.$$
9999
mv ${STORE_DIR}/queue ${STORE_DIR}/.lock ${STORE_DIR}/dead_letter_queue ${STORE_DIR}/uuid ${STORE_DIR}/oldqueue.$$
100+
mv $LOG_DIR/$JOB_NAME.stdout.log $LOG_DIR/$JOB_NAME.stdout.log.old
100101
fi
101102

102103
exec chpst -u vcap:vcap /var/vcap/packages/logstash/bin/logstash \

0 commit comments

Comments
 (0)