CMP VM count in CMDB for LicensingSummaryProcess of calculating the Node License: The below scripts executes every day to gather the information of the Provisioned and Non-Provisioned VMs CMPDailyNodeAverageCount (DEF1000257) https://<InstanceName>.service-now.com/usageanalytics_count_cfg.do?sys_id=1465e3ceeb153200979aa5115206fef8 CMP_Provisioned_VM_Count (DEFN1000844) https://<InstanceName>.service-now.com/usageanalytics_count_cfg.do?sys_id=cb5bcd58db8c27003fcbe1d3ca9619c5 CMPDailyProvisionedVMAverageCount (DEFN1000845) https://<InstanceName>.service-now.com/usageanalytics_count_cfg.do?sys_id=31932931db042b003fcbe1d3ca961923 The above script query the table “license_details” for name “Cloud Management - Node” and get the value from “used”.The values are populated to the usageanalytics_count table.The value in the “license_details” tables for “Cloud Management - Node” is the one year average of “CMP_Provisioned_VM_Count” from “usageanalytics_count” table.After VM’s are terminated we don’t see any usage count for VMs."Cloud Management - Node Subscription Metrics" from “Subscription Overview” dashboard shows a decrease in usage from this month onwards. Note: Understanding more on the License metrics and calculations need to be communicated with designated account Managers or open a case with Technical Support. Below query that can be executed from scripts background which will return the name and sysid of all the nodes that are used in license calculations var gr = new GlideAggregate("ldc_hosted_vm_instance");var queryBase = "vm_stateINon,off,paused,starting,stopping,pausing^ORvm_sys_created_onONYesterday@javascript:gs.beginningOfYesterday()@javascript:gs.endOfYesterday()^rel_type=5f985e0ec0a8010e00a9714f2a172815^vm_sys_created_onNOTONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()^EQ";gr.addEncodedQuery(queryBase);gr.query();count = gr.getRowCount();gs.print('All VM Count' + count);for (var i = 0; i < count; i++) {if (gr.next())gs.print('VM name: ' + gr.rel_parent.getDisplayValue('name') + 'VM sysID: ' + gr.rel_parent);} The above script will print the complete information of the VMs discovered and Provisioned. Number of VMs provisioned using Cloud Management (CMP_PROVISIONED) + Number of CMP discovered VMs Related Links Why CMDB CI staleness rules don’t impact licensing? As it happens it does - just not directly and automatically. There is something called "Remediation Rules" which are rules configured to take action on CMDB health rules. Remediation rules are associated with the workflow. In a workflow, the user can specify custom logic/action to perform based on the satisfaction of criteria. Remediation rules can be Manual or Automatic.Official documentation: https://docs.servicenow.com/csh?topicname=t_CreateCMDBRemediationRule.html&version=latestBut here's a nice blog talking about the same: https://community.servicenow.com/community?id=community_blog&sys_id=f7fca6a5dbd0dbc01dcaf3231f9619fa Though the blog is slightly old, it's essence remains the same. As the blog mentions, the remediation action to be taken can include changing the state of CI to non-operational which will exclude it from licensing.The deeper point is that staleness is not permanent. When we call something stale, we don't rule out the chance of object coming back in some way. Thus, it is the responsibility of user/admin to make sure that appropriate remediation rules are in place to handle stale - or for that matter orphan - CIs.Cloud discovery is a special case. Cloud discovery has a business rule that automatically and directly handles stale CIs. The corresponding business rule is "Reconcile CI" for your reference. How to create a monthly consumption chart? Navigate to Configuration->CMDB Reports.Click on a new report.Provide a proper name for the report, select the source type as "Table" and select the table "usageanalytics_count".Select Bar as graph type (or any other as you see fit).In "Configure" section, select "Group by" as "Created" field if you want age-wise grouping of CI. If you want daily data, select "Accrual Period". Select "Count" in "Aggregation" field and "Show all" in "Max number of groups" field. Additionally, you can select "Display data table" to see the data in the tabular format below the graph.Add a filter for data as "Table or Script Name starts with CMP