Qlik Community

Ask a Question

Deployment Framework

QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 

QlikView Dashboard that shows when all of your dashboards were last loaded with start/end times and flags errors.

Had an ask to create a dashboard that would show the start and end times for all dashboards and call out errors.

Our dashboards are in multiple nested file paths so this loops through multiple directories and/or servers to produce 1 report.

Sorry I had to scramble paths, server names and dashboard names.

You only need to change the call scan folder to match your paths.



Set vConcatenate = ;

sub ScanFolder(Root)

          for each FileExtension in 'log'

for each FoundFile in filelist( Root & '\*.' & FileExtension)



                              LOAD *, '$(FoundFile)' as SourceFile, if(Index(@1,'Execution Failed')>0,'FAILED') as JobStatus,

                              trim(right(@1,len(@1)-index(@1,':',-1)-1)) as errorLine,

                              left(subfield('$(FoundFile)','\',-1),len((subfield('$(FoundFile)','\',-1)))-4) as Dashboard,

                          left(@1,index(@1,':',-1)-1) as ActionTime

                             FROM [$(FoundFile)] (txt, unicode, no labels, delimiter is '\n', msq);

                              Set vConcatenate = Concatenate;

                    next FoundFile

          next FileExtension

          for each SubDirectory in dirlist( Root & '\*' )

                    call ScanFolder(SubDirectory)

          next SubDirectory

end sub

Call ScanFolder('\\xxxxx\QlikviewFiles\SourceDocuments\MAIN\09_App') ;

//Substitute your full paths can handle as many folder paths as you like.

Call ScanFolder('\\xxxx2\QlikviewFiles\SourceDocuments2\Other Dashboards') ;



load *,

left(SourceFile,len(SourceFile)- (len(Dashboard)+4)) as Path  resident MAIN

where wildmatch(errorLine,'*Execution finished*','*Execution started*','*Execution failed*')>0;

Load * inline [errorLine,Line Status

Execution started., 1-STARTED

Execution finished.,2-FINISHED

Execution Failed, 3-FAILED];

drop table MAIN;

load Dashboard, 1 as FailureFlag

resident MAIN2

where JobStatus='FAILED';


0 Replies