Monitoring Scheduled Tasks

The monitoring system monitors the state of all enabled scheduled tasks.  The details page lists all Enabled tasks and the task name, state, last start time, next start time and the retry count.

  • It will report "Trouble" if any task has an ERROR status, or if the task missed it's scheduled runtime by more than 5 minutes.
  • It will report "Attention" if any task as a status of FAILED or NONE and the retry count is > 1.
  • It will report "Attention" if the running time exceeds the next scheduled start time.

The system takes into account the last time the middle tier was restarted in its calculations.

The status is determined by querying the TSK table:  YELLOW means Attention, RED means Trouble, GREEN means OK. 

     SELECT
        TSK.TSK_NAME,
        DECODE(TSK.TSK_DISABLE, 0, 'Enabled', 1, 'Disabled') TSK_ENABLE_DISABLE,
        TO_CHAR(TSK.TSK_LAST_START_TIME, 'MM/DD/YYYY HH:MI:SS AM') TSK_LAST_START_TIME,
        TO_CHAR(TSK.TSK_NEXT_START_TIME, 'MM/DD/YYYY HH:MI:SS AM') TSK_NEXT_START_TIME,
        TSK.TSK_INTERVAL,
        TSK.TSK_STATUS,
        TSK.TSK_RETRY_COUNT,
        CASE
          WHEN TSK_STATUS = 'FAILED' AND TSK.TSK_RETRY_COUNT >= 2 THEN 'YELLOW'
          WHEN TSK_STATUS = 'NONE' AND TSK.TSK_RETRY_COUNT >= 2 THEN 'YELLOW'
          WHEN TSK_STATUS = 'ERROR' THEN 'RED'
          WHEN TSK_STATUS = 'RUNNING' AND ((TSK.TSK_LAST_START_TIME + TSK.TSK_INTERVAL/24/60) < SYSDATE) THEN 'YELLOW' -- Interval = 1 Minute
          WHEN TSK_STATUS = 'INACTIVE' AND SIGN((SYSDATE - (TSK.TSK_LAST_START_TIME + TSK.TSK_INTERVAL/24/60 + 5/24/60))) = 1 THEN 'RED' -- Interval = 1 Minute, Latency Factor = 5 Minutes
          ELSE 'GREEN'
        END YU_TSK_SCH_HEALTH_STATUS_FLAG
    FROM idmgr.TSK
    WHERE (TSK.TSK_DISABLE = 0) OR -- ENABLED
          (TSK.TSK_DISABLE = 1 AND TSK_STATUS = 'ERROR') -- DISABLED AND ERROR
    ORDER BY TSK_NAME ASC;

Labels

 
(None)