IBM ILMT - Difference in the Product Usage Per Server between IBM ILMT and ServiceNowSummaryIntegrating with the IBM License Metric Tool (ILMT) or BigFix Inventory using v2 APIsInstructions Scheduled Job 'SAM - Import IBM Usage Data From ILMT V2':- https://<instance-name>.service-now.com/sysauto_script.do?sys_id=3c705d53f40e2150f8775dfabc9adaba Script Includes Involved:- SamILMTV2ImportJob:- https://<instance-name>.service-now.com/sys_script_include.do?sys_id=ea3a00de44f26110f877ce8937c7c83c SamILMTV2APIHandler:- https://<instance-name>.service-now.com/sys_script_include.do?sys_id=1faacc9e44f26110f877ce8937c7c8f5 ========================================= Data Insertion Flow:- First we will fetch the license_usage for the supported metrics (PVU, RVU, VPC) for the last 90 days. Then we will fetch the license_usage_per_server for the above fetched metrics. ========================================= Filters Applied:- Filter 1:- https://<instance-name>.service-now.com/sys_alias.do?sys_id=ce368f0f0b2003006586650d37673a55 By default, the results are returned for the computer group of the user whose token is used for authentication and cover the period for which data is aggregated in this group. https://www.ibm.com/docs/en/license-metric-tool?topic=v2-retrieval-license-metric-utilization#license_usage Filter 2:- The script include 'SamILMTV2APIHandler' adds the below 'metric_code_name' to the URL to fetch only supported metrics. const supportedMetricCodenames = [ 'PVU_FULL_CAP', 'PVU_SUB_CAP', 'RVU_FULL_CAP', 'RVU_SUB_CAP', 'VIRTUAL_PROCESSOR_CORE', ]; https://www.ibm.com/docs/en/license-metric-tool?topic=v2-metric-ids-code-names#reference_vys_ysj_b1b Filter 3:- The product_id, metric_id, and bundle_id received from the license_usage API call will be used to query for license_usage_per_server records in SamILMTV2APIHandler script include. https://www.ibm.com/docs/en/license-metric-tool?topic=v2-retrieval-license-usage-information-per-server ========================================= Note:- ****with the above filters applied, the data in ServiceNow should match closely with the data from IBM ILMT*** Sample API and Response in your configuration:- license_usage API:- https://<IP_ADDRESS>:<PORT>/api/sam/v2/license_usage?token=XXXXX&columns[]=product_name...&criteria={"or":[["metric_code_name","=","PVU_FULL_CAP"],["metric_code_name","=","PVU_SUB_CAP"],["metric_code_name","=","RVU_FULL_CAP"],["metric_code_name","=","RVU_SUB_CAP"],["metric_code_name","=","VIRTUAL_PROCESSOR_CORE"]]}&startdate=2023-11-25&enddate=2024-02-23&limit=5000 ----------------------------------------------------------- Response:- { "total": 20, "rows": [ {"product_id": 2996,"product_name": "IBM MQ Advanced Message Security","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 4530,"product_name": "IBM InfoSphere Change Data Capture","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 7256,"product_name": "IBM Control Center Monitor for Non-Prod Environment","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 8451,"product_name": "IBM Data Replication for Non-Production Environments","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 9991,"product_name": "IBM MQ","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 10472,"product_name": "IBM WebSphere Application Server - Express","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 11511,"product_name": "IBM MQ Advanced","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 12399,"product_name": "IBM Control Center Monitor","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 13288,"product_name": "IBM MQ Managed File Transfer Service","metric_id": 3,"metric_code_name": "PVU_FULL_CAP",...}, {"product_id": 2996,"product_name": "IBM MQ Advanced Message Security","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 4530,"product_name": "IBM InfoSphere Change Data Capture","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 7256,"product_name": "IBM Control Center Monitor for Non-Prod Environment","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 8451,"product_name": "IBM Data Replication for Non-Production Environments","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 9991,"product_name": "IBM MQ","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 10472,"product_name": "IBM WebSphere Application Server - Express","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 11511,"product_name": "IBM MQ Advanced","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 12399,"product_name": "IBM Control Center Monitor","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 13288,"product_name": "IBM MQ Managed File Transfer Service","metric_id": 4,"metric_code_name": "PVU_SUB_CAP",...}, {"product_id": 13632,"product_name": "IBM Tivoli Monitoring","metric_id": 7,"metric_code_name": "RVU_FULL_CAP",...}, {"product_id": 13632,"product_name": "IBM Tivoli Monitoring","metric_id": 8,"metric_code_name": "RVU_SUB_CAP",...} ] } ----------------------------------------------------------- license_usage_per_server API:- https://<IP_ADDRESS>:<PORT>/api/sam/v2/license_usage_per_server?token=XXXXX&date=2024-02-23&columns[]=server.active_computers...&criteria={"and":[["product_id","=","8451"],["metric_id","=","3"],["bundle_id","=","0"]]}&limit=5000 ----------------------------------------------------------- Response:- { "total":1, "rows":[ {"product_name":"IBM Data Replication for Non-Production Environments","product_id":8451,"metric_code_name":"PVU_FULL_CAP","metric_id":3,"hwm_quantity":240,"bundle_id":0,"server":{"id":493,"name":"TLM_VM_XXXX","type":1,"hardware_vendor":"-","hardware_model":"-","total_processors":1,"hardware_serial_number":"TLM_VM_XXXX","cores":2,"pvu_per_core":120,"active_computers":1}} ] } ========================================= Table Transform Maps:- https://<instance-name>.service-now.com/sys_transform_map_list.do?sysparm_query=name%3DTransform%20ILMT%20Product%20Usage%5EORname%3DTransform%20ILMT%20Device%20Usage&sysparm_view= For Product Usages and Device Usages, we process multiple rows in the staging table into a single row in product usage table because full cap and sub cap values for a product is returned as separate rows by the ILMT API but SN stores the data in the same row as different columns. ILMT Product Usages:- https://<instance-name>.service-now.com/ilmt_v2_product_usage_list.do?sysparm_query=&sysparm_first_row=1&sysparm_view= ILMT Product Usage Per Servers:- https://<instance-name>.service-now.com/ilmt_v2_usage_per_server_list.do?sysparm_query=&sysparm_first_row=1&sysparm_view= ILMT Discovered Computers:- https://<instance-name>.service-now.com/ilmt_discovered_computer_list.do We create a new computer record only if there exists no Computer with matching 'server_hw_serial_number' fetched from the license_usage_per_server API . ========================================= Related Linkshttps://docs.servicenow.com/csh?topicname=integrating-ilmt-bigfix-v2-apis.html&version=latest