Skip to content

Commit 177fcba

Browse files
README.md
Updated the README.md file
1 parent 4357083 commit 177fcba

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ITOM/Discovery/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
The JavaScript code is part of a ServiceNow workflow that helps find a device on the network using a specific IP address. It starts by defining two MID (Management, Instrumentation, and Discovery) servers and retrieves the target IP address from the current workflow. The code creates a Discovery object to handle the discovery process. First, it tries to find the device using the first MID server and saves the result. If that doesn’t work (if the result is null), it logs a message and tries again with the second MID server. Finally, it logs the discovery result and the IP address, updating the current context with the discovery status. This method increases the chances of successfully finding the device by trying two different servers.
1+
This code snippet automates the discovery of devices in ServiceNow using MID (Management, Instrumentation, and Discovery) servers by triggering Quick Discovery through a workflow. The code can also be modified for different workflows/ flows as needed.
2+
3+
Key features include:
4+
5+
MID Server Setup: It defines two MID servers to ensure redundancy, which improves the chances of successfully finding devices.
6+
7+
IP Address Retrieval: The code retrieves the IP address to be scanned from the current workflow context.
8+
9+
Discovery Process:
10+
11+
It creates a Discovery object to initiate the process. The script first attempts to find the device using the first MID server. If that fails, it logs a message and tries again with the second MID server. Logging and Status Update: After the discovery attempts, the script logs the results and updates the current context with the discovery status.
12+
13+
This code enhances device discovery in ServiceNow, making the process more reliable by utilizing multiple MID servers.

0 commit comments

Comments
 (0)