Updating Discovery to version 3.x

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Requirements

Here are the requirements for this version:

  • .Net Framework 4.7.2
  • Insight 8.1 or later

Assets Discovery 3.1.9 or later:

  • If you are using Assets bundled with Jira Service Management, upgrade to Jira Service Management 5.3 or later.
  • If you install Assets via the marketplace, upgrade to Assets 8.10.12 or later.

Upgrade FAQs

Some questions you might have:

Do I need to remove all existing object types and create from scratch?

No, you can keep your existing object types. You can add new object types and attributes manually (you can find them below on this page). You can also use the Inspect configuration feature in your Import configuration.

Do I need to remove my Import configuration and create from scratch?

No, you can use your existing Import configuration. Make sure that you created the new object types and attributes listed below. 

Can I use my existing scan settings?

Yes, you can use your existing scan settings.

Does the new release have a performance impact (i.e. higher system requirements)?

No, Assets Discovery creates a negligible load on the server running the application.  

Patterns

In Discovery 3.x, the logic of the pattern files has changed in the following way.

Previously, each pattern has returned an object or a list with particular information based on the use case and the internal logic and merged the new information with the previously fetched data.

Example

For example, the pattern used to get the hostname of a Linux system:

  • In Discovery 2.x, the pattern has created a new HostInfo-Object and added the Hostname-Attribute from the result to that object.
  • In Discovery 3.x, the pattern is reusing the HostInfo-Object that is initially created on the start of the scan and enrich the Hostname-Attribute from the result. 

That means that the merge logic has removed and the full transparency of data is moved to the pattern execution.

New command results

In Discovery 3.x, every pattern process type has a command result implementation:

Process typeCommand result type
WMIQueryWMIQueryResult
WMIRegValue

WMIRegValueResult

WMIRegValueList

WMIRegValueListResult

WMIExecuteWMIExecuteResult
PowerShellExecutePowerShellExecuteResult
SSHExecuteSSHExecuteResult
SNMP_GETSNMPExecuteResult
SNMP_WALKSNMPExecuteResult
VIMObjectVIMCommandResult


Adjusting custom patterns

If you created custom patterns, update them in the following way:

SSH Provider

In earlier versions, we parsed the command result directly to the string:

Before
string input = (string)parameters[0];

Now, we parse it to SSHExecuteResult, which has the command result default Interfaces (clickable and redirecting user to the part of the page that includes the interfaces ( LogResult, IsNullOrEmpty..)): 

After
SSHExecuteResult sshExecuteResult = (SSHExecuteResult)parameters[0];


SshExecuteResult is a custom implementation of string and if we want to use string methods, we can parse SshExecuteResult to string.

string commandResult = sshExecuteResult;

WMI Provider

Since there are multiple result types, every single one of them will have its own implementation:

WmiExecuteResult class which is the same as SSH(custom string implementation):

Before
WMIExecuteResult result = (WMIExecuteResult)parameters[0]; 

WmiPowerShellResult class which is also a string result:

PowerShellExecuteResult result = (PowerShellExecuteResult)parameters[0];

WmiQueryResult class which is List of Dictionaries.

Before
ManagementObjectCollection results = (ManagementObjectCollection)parameters[0];
After
WMIQueryResult commandResult = (WMIQueryResult)parameters[0];

WmiRegistryListResult which is a list of strings.

WmiRegistryResult which is a list of objects.

SNMP Provider

SnmpExecuteResult class is the implementation of Dictionary<string, object>

Before
List<ExtendedInformation> input = (List<ExtendedInformation>)parameters[0];
After
SNMPExecuteResult commandResult = (SNMPExecuteResult)parameters[0];

VIM Provider

VimCommandResult is implementation of List<EntityViewBase>

Before
 List<EntityViewBase> input = (List<EntityViewBase>)parameters[0];
After
VIMCommandResult commandResult = (VIMCommandResult)parameters[0];

Default Interfaces

By default, the new CommandResult Classes have useful functions that you can use:

  • IsNullOrEmpty() - Checks if object is null or empty.
  • LogResult() - Log Command with result objects (explanation how to pass log level) .

New object types

Discovery 3.x includes new object types:

  • User
  • Group

New object attributes

Discovery 3.x includes new object attributes:

Device

  • Type
  • Model
  • Serial Number
  • Vendor

Database

  • Instance Name
  • Port


Last modified on Oct 27, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.