How to split hosts based on Operating System - Insight Discovery
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Companies using Insight Discovery can retrieve detailed data from all hosts and devices on their network. All the collected information can be imported into data Insight. However, depending on Insight import configuration settings, Insight creates all Host objects (Windows, Unix, MacOS, others) in the same Object type "Host".
This article details steps on how to split multiple Operating Systems into two or more Objects types, so you can have an Object type for Windows devices and another object type for Unix instead of having all of them together.
Example
Goal
Before - All hosts on same Object type | After - One Object type for each OS |
---|---|
Step-by-step
The idea is to set up the Discovery import as documented in Importing Discovery data to Insight.
In the following scenario we will be using a default Schema creating by using Create predefined Insight structure and then Create predefined configuration.
Create new Object types
You need to enable Inheritance on the Host Object type. As it is created by default, you need to move the two default children, "Connected Device" and "Virtual Guest" to be at the same level as Host. Otherwise, you will not be able to enable inheritance. This needs to be done before the initial import.
Enable Inheritance by setting Let the attributes be inherited by object type children
Add a new attribute to the Host object type. Let's call it 'OS', type Text. This attribute will be used for the Import mapping later on.
Create 2 new Child Object types. They will be using Object Type Inheritance.
Linux
Windows
Any object type with outbound references to the Host object should have the following adjustment
(Object types affected: Host, Collector, Connected Device, Database, Patch, Application, License, Application Service, Discovery, Virtual Guest)
All the above object types have an attribute references the Host Object type by default. In previous steps, we created new Child Object types and we need to allow the references to the new Object types.
Add "Include Children" to all attributes with outbound references to the Host object. In the following example we change the "Referenced Host" in 'Application' Object type
Create object type and attribute mapping
Edit "Host" Object Type mapping and map to the OS attribute with the "Operating System Name" Data Locator.
Create Child Object type mapping for Windows and Linux Child Object types. Here, you need to use an IQL to distinguish between your Operating Systems host and for it, we used the 'OS' attribute we created during the first steps.
In this example, "Filter data source by IQL" for Windows devices will be 'OS like Windows' and for Linux devices will be 'OS like Ubuntu'. You need to use your own OS convention.Windows Linux Enable the Object type mappings
- Synchronise Import
Notes
- It's recommended to test this out in a new Insight empty Schema for testing purpose
If you have already created Hosts, as after the changes and after a new synchronization, same Hosts will be created in their new Object Type, where the Identifier does not yet exist.
You can either sort them manually once Child Object type are created or delete the old ones.