3 Replies Latest reply on Feb 18, 2016 4:54 PM by Matt Coles

    Email alert services for tableau daily extract failure in Tableau server

    Subhadip Mukherjee

      Hi Matt,

       

      I am looking to create Tableau extract failure notification alert. We run our extract every 2 hrs. We have a extract log file in C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs\backgrounder location. Please help me how to identify error logs of extract in every 2 hrs of backgrounder-0.log.

      I am able to check the count of string in file by using below command:

       

      C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs\backgrounder>FIND /C "extract" backgrounder-0.log but not able to print the error message every 2 hours into different txt. that txt will be send as notification attachment.

       

      here is batch file:

       

      @echo off

      SET matchstring=Failed

      SET lastline=

      SET currentline=

       

       

      FOR /F "failed" %%G IN (%C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs\backgrounder\backgrounder-0.log) DO (SET currentline=%%G & CALL :process)

      GOTO:eof

       

       

      :process

      IF /I "%lastline%"=="%matchstring%" (IF /I NOT "%currentline%"=="%matchstring%" (echo %currentline% & echo.))

      IF /I "%currentline%"=="%matchstring%" (IF /I NOT "%lastline%"=="%matchstring%" (echo %lastline% & echo %currentline%))

      SET lastline=%currentline%

      GOTO:eof

       

       

      Output is :

      backgroundJobRunnerScheduler-1 was unexpected at this time

       

      Please give a kind look into it.