Need computer label to be primary DNS name.

Document ID : KB000116984
Last Modified Date : 30/10/2018
Show Technical Document Details
Introduction:
Need to assign Label field with a value from PrimaryDNSName.
Question:
Capture Problem / Question: Need computer label to be primary DNS name. OS: Windows 2012 Product Version: 4.2 Recent Changes to the environment: NA Customer Environment (Production or Test): Production
Environment:
SOI 4.2
 
Answer:
We need to edit the spectrum_policy.xml and add the following section to any classes you want the primaryDNSName value as the label. 

<Format2> 
<Field conditional="PrimaryDnsName" output="Label" format="{0}" input="PrimaryDnsName" /> 
</Format 

Example: 

<EventClass name="ComputerSystem" extends="NetworkEntity"> 
<Format> 
<!-- assign ClassName --> 
<Field output="ClassName" format="ComputerSystem" input="" /> 

<!-- assign correlatable properties, need at least one --> 
<Field output="ComputerName" format="{0}" input="Model_Name" /> 
<Field output="Tags" format="System-Layer-Hardware" input="" /> 
<Field conditional="Vendor_Name" output="Vendor" format="{0}" input="Vendor_Name" /> 
<Field conditional="DeviceType" output="Model" format="{0}" input="DeviceType"/> 
</Format> 
<Format2> 
<Field conditional="PrimaryDnsName" output="Label" format="{0}" input="PrimaryDnsName" /> 
</Format2> 

<Write> 
<Field type="file" name="ComputerSystem.out" properties="*" /> 
<Field type="publishcache" properties="ClassName,ComputerName,Tags,Model,Vendor" /> 
</Write> 
</EventClass> 

Once you edit the policy file, you need to uncheck the "performDeltaProcessing" for the Spectrum connector in order to update existing CIs.