Is there a script to monitor for stuck in-progress tasks?
search cancel

Is there a script to monitor for stuck in-progress tasks?

book

Article ID: 367741

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Suite

Issue/Introduction

There are many valid reasons why a task may get stuck "in progress".  See IN-PROGRESS task issues - A Client’s Guide to Understanding and Resolving

There is not an out of the box scripts to monitor the UI for tasks "in-progress" over X minutes.  A task being "in-progress" may not constitute a problem as this is a valid processing status in IDM before a task completion.

Environment

Identity Manager 

14.5

Resolution

You can review the different pending task states here: How to Manage Identity Manager Tasks Stuck In-Progress
 
The following query is provided as is.  L1 support can not assist with building or modify the below DB query example to help monitor stuck tasks.  It is provided as an additional tool outside of the View Submitted Tasks IM UI.
 
SELECT tasksessionid, name, state, created_time, last_access_time, ((last_access_time-created_time)*86500), SYSDATE
FROM tasksession12_5
WHERE
(((last_access_time-created_time)*86400)>120) and
(SYSDATE-CREATED_TIME) < 0.025 and
state <> 16384 and
state <> 128 and
state <> 2;
 
This query will report on all tasks submitted in the last 36 minutes, taking more than 2 minutes and are not in completed, failed or audited state. Please work with your DBA to modify this to fit your sites needs and if needed run on a schedule.