Logstash is creating a csv file with 0 bytes

(sudi) #1

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
parsedfile=ls /etc/logstash/scripts/fsimage.csv.*
cp $parsedfile /etc/logstash/scripts/fsimagedaily.csv.$(date +'%s')

(Magnus Bäck) #2

You're not out of disk space are you?

It's not clear to me what files Logstash is creating. The zero-byte files at the top of your post appear to be created by one of the shell scripts.

(sudi) #3

issue solve..file permission

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.