Service Map CI Utility
Attached to this article is a script include record 'ServiceMappingCIUtils' with 3 functions that allow the listing of CI Name(s) and associated IP Address(s) for all discovered application services (Service Maps).
These functions list the CI's in a Service Map and include IP address(s), Manual Connections and/or Manual Endpoints when invoked from a scripts background window. Manual Connections include the Parent & Child CI 'name' and 'ip_address'. See sample output below.
Note: < Bold/Red> removed for this example...
Example output for new ServiceMappingCIUtils().getAllInfo(); :
*** Script: ********************* Script: CI Name: Ethernet0 IP_Address: 10.118.152.11*** Script: CI Name: port-channel30 IP_Address: 10.253.1.170*** Script: CI Name: Production IP_Address: 10.123.208.57
*** Script: CI Name: IP_Address: (empty) ---This is Manual Endpoint---
*** Script: CI Name: IP_Address: (empty) ---This is Manual Endpoint---
*** Script: ---This is Manual Connection---
*** Script: **** Parent CI: IP_Address: 10.18.1.122
*** Script: **** Child CI: IP_Address: 10.18.28.151
*** Script: CI Name: IP_Address: 10.12.92.17
*** Script: CI Name: IP_Address: 10.18.94.2*** Script: IP_Address string of unique IP's/Service Map:
*** Script:
- Number of CIs with Unique IP Address:
Possible function calls:
new ServiceMappingCIUtils().getAllInfo();
All CI's details for all Discovered Application Services
new ServiceMappingCIUtils().getHardwareIPs();
Only CI Type Hardware CI's for all Discovered Application Services
new ServiceMappingCIUtils().getRangeSetIPs();
Only a list of CI IP Addresses formatted for 'Quick ranges UI Action' for all Discovered Application Services
All above function calls can be invoked to provide the same report for a single Discovered Application Service, i.e.new ServiceMappingCIUtils().getAllInfo('Citrix');new ServiceMappingCIUtils().getHardwareIPs('Citrix');
new ServiceMappingCIUtils().getRangeSetIPs('Citrix');
Which restricts all reporting to a single Discovered Application Service.
Install via
System Definition -> Script Includes -> Import XML -> Choose the attached xml file
Labels:
https://www.servicenow.com/community/itom-articles/service-map-ci-utility/ta-p/2322211
