i am new to logstash, from few days i have noticed that logstash has started creating 0 byte file
-rw-r--r-- 1 logstash logstash 1859370519 Aug 21 19:57 fsimage
-r--r--r-- 1 logstash logstash 0 Aug 23 09:49 fsimage.csv.1503496165
-r--r--r-- 1 logstash logstash 0 Aug 23 09:49 fsimagedaily.csv.1503496195
-bash-4.2$ cat parsefsimage.sh
export JAVA_HOME=/usr/java/jdk1.8.0_65/
#rm -f /etc/logstash/scripts/fsimage
#fsimage=ls /etc/logstash/scripts/fsimage_*
rm -rf /etc/logstash/scripts/fsimage.csv.*
/etc/logstash/scripts/hadoop-2.8.0/bin/hdfs oiv -t /etc/logstash/scripts/scratch/ -delimiter "|" -p Delimited -i /etc/logstash/scripts/fsimage | sed '1d' | sed 's/"//g' |sed 's/\s//g' > /etc/logstash/scripts/fsimage.csv.$(date +'%s')
===============================================================
-bash-4.2$ cat parsefsimagedaily.sh
export JAVA_HOME=/usr/java/jdk1.8.0_65/
rm -rf /etc/logstash/scripts/fsimagedaily.csv.*
sleep 30
while ps aux | grep fsimage.sh | grep -qv grep; do
sleep 5
done
parsedfile=ls /etc/logstash/scripts/fsimage.csv.*
cp $parsedfile /etc/logstash/scripts/fsimagedaily.csv.$(date +'%s')