An Approach To Server Inventory True Up

Problem Statement:

Your organization uses ServiceNow and ServiceNow Discovery to populate and manage your server CMDB. How do you validate that the server CMDB server inventory is correct? How do you do this on an on going basis?

Goals:

  • Automate all data gathering and reporting.
  • Compare the server inventory against sources of truth for deployed server operating system instances (OSI).
  • Include information that leads to easy identification of gaps in the CMDB server inventory.
  • Include information that leads to easy identification of errors in the CMDB recorded state of server records in the CMDB.
  • Reports must be generated on a daily basis.
  • Reports must be in Microsoft Excel readable file format.
  • Reports must be retained indefinitely in a sane folder structure.
  • Monthly report must be emailed to management.

Solution Architecture:

Now comes the interesting part (for me anyway). The server environment I was dealing with when I took on this task was made up of MS Windows servers, all AD integrated deployed as VM’s using a couple different virtualization platforms. That provides two obvious sources of truth about deployed server OSI as well as a couple supplemental sources.

  1. The virtualization platforms themselves. In this case VMware and Nutanix AHV
  2. Active Directory
  3. DNS (a secondary source used for supplemental information)
  4. The internal network itself for supplemental point in time information

Implementation Platform

Microsoft Windows PowerShell version 5.1 with latest patches. There are “batteries included” PowerShell modules for ServiceNow, Nutanix, VMware, and Active Directory. While the above link points to a document about Python, PowerShell, in my opinion, goes further in exemplifying this design philosophy for the MS Windows infrastructure management problem domain. The scripts to be deployed on a Windows server running in the target network and providing a network file share for the daily reports. PowerShell job scheduling to be used for scheduling the daily runs. Must have access to connect outbound to the ServiceNow instance and be able to send email to an SMTP relay.

Posts in this Series:

  1. Prepare for Logging
  2. Create a Folder Structure For Daily Reporting
  3. Gathering ServiceNow CMDB Server Data
  4. Gathering Nutanix VM Inventory
  5. Merge CMDB Data into the Nutanix VM Data
  6. Gather AD Data For CMDB True Up
  7. Merge CMDB Data with AD Data
  8. Generating The CMDB True Up Report