Skip to content

Commit 032fb43

Browse files
Create TechTrekwithAJ-CheckDiscoveryStatusReadME.md
This script is a ServiceNow troubleshooting utility designed to help administrators quickly check if specific IP addresses were successfully discovered by the Discovery process.
1 parent 8eb8e9e commit 032fb43

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Defines a list of IP addresses to check (hardcoded in the script).
2+
Example IPs: 192.168.1.35, 192.168.1.27, 192.168.1.15.
3+
For each IP address in the list:
4+
It looks up the CI (Configuration Item) in the cmdb_ci_computer table with a matching IP.
5+
If a CI is found:
6+
It checks the discovery_device_history table to see if that CI was discovered by ServiceNow Discovery.
7+
If discovery history exists, it finds the related Discovery Status record (discovery_status table) and gets its number (like DIS123456).
8+
If no CI or discovery record is found, it notes the reason in the result.
9+
Compiles all results (IP + discovery status or error message) into a list.
10+
Prints the results in a clear JSON format in the system logs, making it easy to read and review.

0 commit comments

Comments
 (0)