Share:|

I found a way to run a query that can help diagnosing CMDB data that fails AutomaticIdentification and that is to use the AR DRIVER with GLSQL. Syntax to login to ARS DRIVER with this client is similar to CMDBDRIVER so I am not going to go into details on that here. Instead I'll skip straight to the point query, although to avoid any confusion I need to add that AR DRIVER is a client that is native to any version of ARS, not CMDB. CMDB driver does not wrap ARS DRIVER. These two are different AR clients. Start AR DRIVER from ARSystem API folder on Windows or run it from bin dir on Unix. If you're having hard time find it on UNIX then just run this command:

 

find $BMC_AR_SYSTEM_HOME -name driver

 

You'll get couple locations to chose from.

 

Once you initilize and login to the AR DRIVER then you can take advantage of the GLSQL query to find out how many classes are failing Automatic Identification. The results will then tell me which rules are in need of review. Now, the reason I love this is because I don't have to wait for a DBA to give me access to the database. Keep in mind that you still need to have CMDB admin access to do this.

 

So, here is an example how to run a query on the BMC.ADDM dataset and group the results by ClassId. As follows:

 

Command: glsql

GETLIST SQL

SQL command: select count(ClassId), ClassId from BMC_CORE_BMC_BaseElement where DatasetId = 'BMC.ADDM' AND FailedAutomaticIdentification = 1 group by ClassId;

Maximum number of entries to retrieve (500):

Get number of matches? (F):

 

ARGetListSQL  results

ReturnCode:  OK

Value List List : 3 items

   Value List : 2 items

      Value:  (integer)   51

      Value:  (char)   BMC_COMPUTERSYSTEM

   Value List : 2 items

      Value:  (integer)   5963

      Value:  (char)   BMC_DATABASE

   Value List : 2 items

      Value:  (integer)   18815

      Value:  (char)   BMC_SOFTWARESERVER

Status List : 0 items

 

This tells me that I'll need to review (RECON) Identification Rules for classes ComputerSystem, Database, and SoftwareServer related to my job. The last one must have a very ineffective rule as there are 18815 failed CIs there.

 

Looking at the Identification rules for these classes and the source dataset I can see that I have created 3 rules:

 

Rule 1:

 

 

'TokenId' != "0" AND 'TokenId' != $\NULL$ AND 'TokenId' = $TokenId$

 

 

Rule 2:

 

 

'ADDMIntegrationId' != $\NULL$ AND 'ADDMIntegrationId' = $ADDMIntegrationId$

 

 

Rule 3:

 

 

'SoftwareServerType' != $\NULL$ AND 'SoftwareServerType' = $SoftwareServerType$

 

 

 

So, since Rule #3 is only checking for SoftwareServerType which is an enumerated field then that tells me that this identification is going to fail to identify New CIs as soon as there is already one CI present in the BMC.ASSET dataset with the same enumeration. Recon Engine will not Auto-Identify new CIs if any of the rules have failed and that rule would definitelly cause errors after the first merge. All subsequent jobs would find a match of most of the SoftwareServerTypes because there can only be so many in the option list. Basically an enumerated field should never be used for unique identification by itself. So, that would be an very ineffective rule to have and I'll need to change it.

 

If I combine Rule 2 and Rule 3 together to say:

 

 

Rule 2:

 

 

'ADDMIntegrationId' != $\NULL$ AND 'ADDMIntegrationId' = $ADDMIntegrationId$ AND 'SoftwareServerType' != $\NULL$ AND 'SoftwareServerType' = $SoftwareServerType$

 

Then now I have a much more effective rule that should find a match and accuratelly identify existing CIs in BMC.ASSET and also Autoidentify properly.

 

Once I make that change to the SoftwareServer Identification rule and run the job, then I can use the same GLSQL query to see if the rule now correctly identifies the CIs in BMC.ASSET. The CI must also not fail and Auto-Identify new CIs.

 

 

Command: glsql
GETLIST SQL
SQL command: select count(ClassId), ClassId from BMC_CORE_BMC_BaseElement where D
atasetId = 'BMC.ADDM' AND FailedAutomaticIdentification = 1 group by ClassId;
Maximum number of entries to retrieve (500):
Get number of matches? (F):

 

  ARGetListSQL  results
ReturnCode:  OK
Value List List : 2 items
   Value List : 2 items
      Value:  (integer)   51
      Value:  (char)   BMC_COMPUTERSYSTEM
   Value List : 2 items
      Value:  (integer)   5963
      Value:  (char)   BMC_DATABASE

 

This is the result I was hopping for. Next I'll need to look at Database and maybe the ComputerSystems.

 

I find this method most effective with RE ID Rule and Data validation.