Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

Introduction 

 

With the increased reliance on the IdM solution and the users perception of a real time system we have looked at a few ways to monitor the runtime of tasks. The common IdM runtime exceptions being; dispatchers unavailable, provisioning queue load and the status of joblog id's. With the majority of our customers adopting Computing Centre Management System (CCMS) for their base monitoring solution of SAP, the logical choice was to find a way in which IdM exceptions can be integrated.

 

So the focus of the following blog; is how to integrate IdM job log exceptions to the CCMS architecture, once done customers can alert or forward to ALM.

 

Identity Management Configuration

 

The first step is to extract the job status information out to the operating system in a format that the CCMS agent can read and understand. You will need to grant select permissions of the IdM database runtime role or user to the database view [MCMV_JOBLOG]. Note that after support pack upgrade you may need to reapply this permission.

 

Within IdM 'Job folder' create a job/pass that selects the entries from MCMV_JOBLOG and outputs them to the operating system as an ASCII file.

 

The source tab has the following select statement (RDMS/MSSQL); SELECT [log_id], [job_id], [name], [logdate], [warns], [errs], [dispatcher] FROM [sdi_db].[dbo].[MCMV_JOBLOG] WHERE errs >1 OR warns >1 ORDER BY log_id ASC

 

 

Create the following script within the pass, this is to set the error code within the outputted IdM job log file.

 

function zjobslogsetcode(Par){
code = Par.split("%$glb.SAP_DELIMITER%");
var warning = code[0];
var error = code[1];
if (error >= 1)
 {
  return "ERROR";
 }
  else if(warning >= 1)
 {
  return "WARNING"
 }                   
}

 

The destination tab has the following settings; 'File Name' exports the file on the server where the IdM dispatcher runs and to which the CCMS agent has access to.

 

 

The delta tab is enabled and configured with %log_id% as it's delta key, this ensures that duplicate entries are not exported to the IdM job log file.

 

 

Enable the pass and runtime dispatcher, run the pass a few times confirming that the IdM job log file has been exported correctly. Set the pass to run every minute (or so) at the end of the pass run the reset job logs procedure for the task id that export's the job logs. This prevents the job log monitoring filling with status of the CCMS export job. We also reset the job logs each week and in doing so reset the delta 'IdMJobLogs' created in the above step.

 

 

CCMS Log File Configuration

 

On the IdM dispatcher host where the job log is created a CCMS agent is registered to a SAP NetWeaver Application Server. This CCMS agent has been configured with the log file monitoring template below.

 

LOGFILE_TEMPLATE
DIRECTORY="/usr/sap/SDI/IdM/ccms"
FILENAME="joblog-*.log"
MONITOR_CONTEXT="Job Logs"
MONITOR_NEWEST_FILES=1
MTE_CLASS="Z.IDM_LOGS_JOB"
PATTERN_0="ERROR"
VALUE_0=RED
MESSAGEID_0="rt 584"
SEVERITY_0=50
CMP_FROM_BEGIN_0=1
PATTERN_1="WARNING"
VALUE_1=YELLOW
MESSAGEID_1="rt 584"
SEVERITY_1=25
CMP_FROM_BEGIN_1=1
.

 

SAP help: Monitoring Files with CCMS Agents
http://help.sap.com/saphelp_nw70/helpdata/en/65/f3156d443e744abe15dbe14e4e32b5/content.htm

 

Restart the SAP CCMS agent and add the created MTE to the monitoring set (RZ20)

 

 

Once done you can assign the MTE class to an auto reaction method to either email &/or SMS, in this case it is forwarded to ALM.

 

Demonstration 

 

As a quick demonstration an IdM alert is generated;

 

 

Which is forwarded to CCMS and an alert is raised which in turn triggers the assigned auto reaction.

 

 

The alert is emailed to the recipients and is displayed via the UWL.

 

 

The above was done on IdM 7.1 but in theory it should work for 7.0 Sp2.

 

Hope it is of value.
Craig