Cron task for assigning customers to actual CIs

The assigning, or associating, of the appropriate customers to actual CIs can be performed by a cron task.

The process to assign customers to actual CIs can be performed automatically by running a cron task, ACTCICUSTMAP, which uses XML syntax for its input parameters. The cron task only assigns customers to actual CIs that are not already associated with a customer. The cron task uses the class com.ibm.ism.cci.app.actualci.MapActualCItoCustomerCronTask, which requires the two parameters described below. You can create additional cron tasks using the Cron Tasks application and specifying this class as the processing class.

Cron task parameters:

In the ACTCICUSTMAP cron task, two cron task parameters are required by the class com.ibm.ism.cci.app.actualci.MapActualCItoCustomerCronTask:

Customer_Mapping_XML Parameter
This parameter, in XML syntax, contains the elements to be used to identify the starting set of actual CIs.

For example, you might want your starting set to include all actual CIs whose IP address starts with "9.1.5." (IPADDRESS_STRINGNOTATION that startswith "9.1.5."—this is converted into a query that selects all of the actual CIs that have that attribute). To do this, you can set this value for the Customer_Mapping_XML parameter as follows:

   
<?xml version="1.0" encoding="UTF-8" ?>
<actcicustmap completionEmailTo="you@your.address"
 completionEmailSubject="optional subject"
 preview="true"
 requireItic="true"
 >
<!-- this is the section for customer ACCOUNT1 -->
<customer name="ACCOUNT1"
   completionEmailTo="you@your.address"
   completionEmailSubject="optional email subject for ACCOUNT1 "
  
>
  <!-- starting with actual CIs matching whose IPADDRESS_STRINGNOTATION 
          value starts with 9.1.5.  -->
  <AND>
   <attribute name="IPADDRESS_STRINGNOTATION" type="alnvalue">
     <startswith value="9.1.5." />
   </attribute>
  </AND>
</customer>
<!-- END OF ACCOUNT1 customer definition -->
</actcicustmap>

  

For examples and further detail, see Customer_Mapping_XML parameter.

Mapping_Control_XML parameter
This parameter contains rules to identify related actual CIs to also assign to the customer once you have the starting set of actual CIs.

For example, once you have a starting set of IP addresses, your starting actual CIs will be classified as NET.IPADDRESS and will have related actual CIs (the relationships are created by the TADDM adapter when the actual CIs are loaded into the Control Desk database).

The related CIs will have types like NET.IPINTERFACE. The NET.IPINTERFACE actual CI would have relationships to other types, for example, SYS.COMPUTERSYSTEM.

The SYS.COMPUTERSYSTEM actual CI will have relationships to others like SYS.WINDOWS.WINDOWSOPERATINGSYSTEM.

For examples and further detail, see Mapping_Control_XML parameter.

Further information on these parameters is discussed in Customer_Mapping_XML parameter and Mapping_Control_XML parameter.

The ACTCICUSTMAP cron task uses the Customer_Mapping_XML parameter to find the starting actual CIs to assign to each customer. Each actual CI processed by the cron task has a classification and related actual CIs. The related actual CIs will be assigned to the customer according to the rules in the Mapping_Control_XML parameter.

The ACTCICUSTMAP cron task performs these steps each time it runs:

  1. Check whether the cron task has run, in non-preview mode, since the last time CI data was imported.
    Note: If the cron task is preview="false", requireItic="true", and the TADDM adapter has not run, then the cron task will exit until its next scheduled time.
  2. Validate the XML content of both parameters. If a required setting is missing or not properly configured, the cron task will log an error and exit.
  3. For each customer definition in the Customer_Mapping_XML parameter:
    1. Verify that the customer exists. If not, or if the user running the cron task is not authorized to work with this customer's data, log an error and exit.
    2. Identify actual CIs that meet the assignment criteria specified for the customer. These are called starting CIs. Only actual CIs that do not already have a customer association will be included as starting CIs. Starting CIs will be associated with the customer.
    3. For each CI identified as belonging to the customer, identify CIs related to it as source or target of a relationship. Using the defined rules, determine if the related actual CI also belongs to the customer. If so, add it to the list of actual CIs to process. This check for related CIs is repeated for each CI that is subsequently added to the list.
    4. For each actual CI identified for the customer, save its GUID, classification, and actcinum (unique name) in the CSV file. If preview="false", the customer associations are made.
    5. If configured, send an email when the assignment for the customer is completed, listing the CIs that were assigned to the customer, or, if running in preview mode, would have been assigned.
  4. Send a summary email when all the customer definitions have been processed.

A cron task definition is created during Control Desk installation. If you want to use this cron task, you must create an instance using the Cron Task Setup application (Go To > System Configuration > Platform Configuration > Cron Task Setup).

The cron task can process only those customers for which the user who runs the cron task, specified in the Run as User field, has authorization. To process all actual CIs, run the cron task as a user authorized to work with data for all customers.

Important: The customer assignment task is resource intensive. It can be configured to check every actual CI in your system. It uses the threads that you have configured for promotions and other related tasks. A separate background job is started for each customer definition. These jobs are run sequentially to avoid overloading the system. You should consider scheduling the cron task to run when only a minimum number of users are expected to be using the system.


Feedback