Discovery 101: Using Behaviors
Last month, I shared best practices for creating schedules in the ServiceNow Discovery application. To recap, the Discovery schedule is a key component of the application because it dictates what systems need to be scanned and when these scans should occur. Per the schedule, scans can be set to run at a normal interval or as a one-time job.
In most environments, the duration of Discovery scans are an area of concern since avoiding other bandwidth hungry functions such as back-ups is essential. In most cases, the windows of opportunity for these scans are rather narrow and require efficient use of the time allotted. Discovery Behaviors, which allow you to control Access Control Lists, Scans in Multiple Domains and Multiple Protocols, are an effective way to optimize the efficiency.
How Behaviors Work
When creating Discovery schedules, you will have the opportunity to define the “Behavior” of the schedule. Behaviors allow you to control which probes are launched by the Shazzam Probe, thus eliminating unnecessary traffic and shortening the scan time.
To set the Behaviors, go to the Discovery definition application in the left hand navigation pane and select Behavior>New. Give your new Behavior a name that will be clearly recognized.
Now it’s time to decide on the functionality of your Behavior. In the Discovery Functionality section, which can be found below the Name section, click the “New” button.
In this form you will define four key features:
-
Phase: This is an arbitrary number of your choosing that will control the sequence of individual executions of the Shazzam Probe.
-
Functionality: Functionality is selected from a list of preconfigured individual or groups of Protocols. Custom functionalities can also be created from the Functionality Definition module.
-
MID Servers: Select the MID Server(s) that will follow this behavior.
NOTE: When multiple MID Servers are selected, Discovery will automatically balance the server load. However, MID Server Clusters are available and using them is the best practice for balancing MIDs (more to come on this in another article).
-
Match Criteria: Select “Any” — a logical OR — or “All” — a logical AND. In other words, if ANY is selected, then one criterion match out of the related records will cause this functionality to be used. If ALL is selected, then every criterion added in the related list must match in order for the functionality to be used. Setting the match criteria is a great way to make the Behavior run more intelligently.
Once you save the Behavior record, the Functionality Criteria related list will be exposed. Functionality Criteria are required only for Windows MID Servers and when the Behavior controls Discovery scans across multiple domains.
When using Functionality Criteria, it’s important to indicate two fields:
Name: The name in the criteria is the variable that passes the following information:
-
mid_server: MID Server that processes the results from the Shazzam Probe.
-
win_domain: Windows domain of the target device.
Value: Enter the actual name of the MID Server (mid_server) or domain (win_domain) to pass to Discovery for this criterion. This field can also have a value of mid_domain, which defines the Windows domain of the MID Server that is processing the Shazzam results.
When used correctly as outlined above, Behaviors should help you create more intelligent and efficient Discovery Schedules that reduce the amount of time and network traffic required to perform a scan. A properly tuned Discovery Schedule that features Behaviors will ensure that the protocols necessary to discover device information are the only protocols attempted. This is a big time-saver when it comes to fine-tuning Discovery into a fast tool to populate your CMDB accurately and quickly.
Learn More
If you’re interested in learning more about getting started with Discovery and best practices for using this application in ServiceNow, check out some of these helpful resources:
Where do we go from here? Check back next month for the next Discovery 101 blog post, which will cover more best practices and application use cases!