Loading import_into_DB.sh +12 −5 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ sed 's/Execute /\n/g' | \ sed '1d' | \ awk -F';' '{pb=""} tolower($0)~/(error|exception)/ {pb=$3} {print $1";"$2";"pb";"$(NF-2)";"$(NF-1)}' | \ sed "s/^/$f;$d;/" | \ sed "s/\$/;;;;;;;/" >> $CSV sed "s/\$/;;;;;;;;/" >> $CSV echo >> $CSV done Loading Loading @@ -96,6 +96,7 @@ create table tasks( stopped text, duration text, failed text, has_exception text, has_error text); .import $CSV tasks Loading Loading @@ -150,14 +151,19 @@ update tasks set failed = 1 where ligne5 like '%task failed:%'; -- has_exception update tasks set has_exception = 0; update tasks set has_exception = 1 where ligne3 like '%Exception%'; -- has_error update tasks set has_error = 0; update tasks set has_error = 1 where ligne3 like '%Exception%' or lower(ligne3) like '%error%'; where lower(ligne3) like '%error%'; .exit eof Loading Loading @@ -234,6 +240,7 @@ select t.date, e.composant, e.name, sum(failed) as nbre_failed, sum(has_exception) as nbre_exception, sum(has_error) as nbre_error, a.sur from tasks t -- les taches Loading @@ -248,7 +255,7 @@ from tasks t -- les taches on a.classname = t.classname and a.date = t.date group by t.date, t.classname, e.composant, e.name having nbre_failed + nbre_error > 0 having nbre_failed + nbre_exception + nbre_error > 0 ; Loading Loading
import_into_DB.sh +12 −5 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ sed 's/Execute /\n/g' | \ sed '1d' | \ awk -F';' '{pb=""} tolower($0)~/(error|exception)/ {pb=$3} {print $1";"$2";"pb";"$(NF-2)";"$(NF-1)}' | \ sed "s/^/$f;$d;/" | \ sed "s/\$/;;;;;;;/" >> $CSV sed "s/\$/;;;;;;;;/" >> $CSV echo >> $CSV done Loading Loading @@ -96,6 +96,7 @@ create table tasks( stopped text, duration text, failed text, has_exception text, has_error text); .import $CSV tasks Loading Loading @@ -150,14 +151,19 @@ update tasks set failed = 1 where ligne5 like '%task failed:%'; -- has_exception update tasks set has_exception = 0; update tasks set has_exception = 1 where ligne3 like '%Exception%'; -- has_error update tasks set has_error = 0; update tasks set has_error = 1 where ligne3 like '%Exception%' or lower(ligne3) like '%error%'; where lower(ligne3) like '%error%'; .exit eof Loading Loading @@ -234,6 +240,7 @@ select t.date, e.composant, e.name, sum(failed) as nbre_failed, sum(has_exception) as nbre_exception, sum(has_error) as nbre_error, a.sur from tasks t -- les taches Loading @@ -248,7 +255,7 @@ from tasks t -- les taches on a.classname = t.classname and a.date = t.date group by t.date, t.classname, e.composant, e.name having nbre_failed + nbre_error > 0 having nbre_failed + nbre_exception + nbre_error > 0 ; Loading