Logstash parsing progress bar -


i'm newbie logstash , i'm using parsing 500mb of logfiles in particular directory, when i'm start logstash doen't show progress bar how % has completed parsing log file. there way see progress of log parsing done?

no, logstash has no built-in progress bar feature. of time wouldn't make sense since logstash meant process ever growing logs continuously, , there isn't "done".

what correlate contents of sincedb file file size of corresponding file. sincedb file logstash stores current offset in file. exact description of file format found in file input's documentation, have care first , last columns. first column inode number, can found in ls -li output file, , last column current offset. example:

393309 0 64773 437 

here, logstash @ offset 437 file inode 393309.

the join command can used join file ls -li output (where file's inode number in first column):

$ join /var/lib/logstash/.sincedb_f5fdf6ea0ea92860c6a6b2b354bfcbbc <(ls -li /var/log/syslog) 393309 0 64773 437 -rw-r----- 1 root adm 437 oct 15 12:47 /var/log/syslog 

finally, awk can used clean output , produce percent-completed number:

$ join /var/lib/logstash/.sincedb_f5fdf6ea0ea92860c6a6b2b354bfcbbc <(ls -li /var/log/syslog) | awk '{ printf "%-30s%.1f%\n", $13, 100 * $4 / $9 }' /var/log/syslog               100.0% 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -