This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

UDT Port discovery via API

Plenty of posts out there on this topic, but really need to get more attention.  How can the discovery job be set via API to enable port discovery for UDT? 

Parents
  • Admittedly I have never looked at UDTs API capabilities in Orion. Having recently spent some time digging around discovery profiles let me share what I know and perhaps there may be something of benefit here in the absence of native API features for UDT  

    The configuration of a scheduled discovery can be considered as 2 elements

    1. The definition of the discovery profile attributes such as name, timeout, hops allows ICMP only etc.

    2. The configuration of the modules, referred to as plugins, where we will define things like the list of i.ps or ranges, and other module-specific elements for NCM, SAM, VIM etc. These are all saved in the PluginConfigurations field of the DisoveryProfile. 

    The PluginConfiguration also includes KnownTypes and so UDT ports will be discovered if creating a discovery profile via API (assuming UDT is installed and thus a KnownType)

    <knownTypes>
    		<ArrayOfstring
    			xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    			xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    			<string>SolarWinds.Orion.Core.Models.Discovery.CoreDiscoveryPluginConfiguration,SolarWinds.Orion.Core.Models.V1</string>
    			<string>SolarWinds.VIM.Common.Configuration.VimDiscoveryPluginConfiguration,SolarWinds.VIM.Common</string>
    			<string>SolarWinds.NCM.Contracts.Discovery.NcmDiscoveryPluginConfiguration,SolarWinds.NCM.Contracts</string>
    			<string>SolarWinds.Interfaces.Common.Models.Discovery.InterfacesDiscoveryPluginConfiguration,SolarWinds.Interfaces.Common</string>
    			<string>SolarWinds.APM.BlackBox.Sql.Common.Models.Discovery.ApmBlackBoxSqlDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Sql.Common</string>
    			<string>SolarWinds.APM.BlackBox.Exchg.Common.Models.Discovery.ExchangeDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Exchg.Common</string>
    			<string>SolarWinds.APM.BlackBox.Wstm.Common.Models.Discovery.DiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Wstm.Common</string>
    			<string>SolarWinds.APM.BlackBox.IIS.Common.Models.Discovery.IISDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.IIS.Common</string>
    			<string>SolarWinds.APM.BlackBox.ActiveDirectory.Common.Models.Discovery.ActiveDirectoryDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.ActiveDirectory.Common</string>
    			<string>SolarWinds.UDT.Common.Models.Discovery.UDTDiscoveryPluginConfiguration,SolarWinds.UDT.Common</string>
    			<string>SolarWinds.Orion.SCM.Models.Discovery.ScmDiscoveryPluginConfiguration,SolarWinds.Orion.SCM.Models</string>
    		</ArrayOfstring>
    	</knownTypes>

    I say discovered rather than imported because there are additional elements in the PluginConfiguration that look to be interesting for UDT

    <DiscoveryPluginConfigurationBase
    							xmlns:d2p1="http://schemas.solarwinds.com/2008/UDT" i:type="d2p1:UDTDiscoveryPluginConfiguration">
    							<d2p1:AutoImportPorts>false</d2p1:AutoImportPorts>
    							<d2p1:AutoImportStatus
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/SolarWinds.Interfaces.Common.Enums">
    								<d3p1:IfAutoImportStatus>Up</d3p1:IfAutoImportStatus>
    							</d2p1:AutoImportStatus>
    							<d2p1:AutoImportVirtualTypes
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
    								<d3p1:boolean>true</d3p1:boolean>
    								<d3p1:boolean>false</d3p1:boolean>
    								<d3p1:boolean i:nil="true" />
    							</d2p1:AutoImportVirtualTypes>
    							<d2p1:AutoImportVlanPortTypes
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Enums">
    								<d3p1:VlanPortType>Access</d3p1:VlanPortType>
    								<d3p1:VlanPortType>Trunk</d3p1:VlanPortType>
    								<d3p1:VlanPortType>Unknown</d3p1:VlanPortType>
    							</d2p1:AutoImportVlanPortTypes>
    							<d2p1:Expressions
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/SolarWinds.UDT.Common.Discovery.Filtering.Expressions" i:nil="true" />
    								<d2p1:IsNPMDiscoveryPluginLoaded>false</d2p1:IsNPMDiscoveryPluginLoaded>
    							</DiscoveryPluginConfigurationBase>

    There are no API methods available to update these values for UDT, however, I have successfully used direct SQL commands to update other values and behavior. 

    In my initial testing, updating a DiscoveryProfile with the query below and importing the results did not have the expected port types.

    update DiscoveryProfiles set PluginConfigurations = replace(PluginConfigurations,'<d2p1:AutoImportPorts>false</d2p1:AutoImportPorts>','<d2p1:AutoImportPorts>true</d2p1:AutoImportPorts>')

Reply
  • Admittedly I have never looked at UDTs API capabilities in Orion. Having recently spent some time digging around discovery profiles let me share what I know and perhaps there may be something of benefit here in the absence of native API features for UDT  

    The configuration of a scheduled discovery can be considered as 2 elements

    1. The definition of the discovery profile attributes such as name, timeout, hops allows ICMP only etc.

    2. The configuration of the modules, referred to as plugins, where we will define things like the list of i.ps or ranges, and other module-specific elements for NCM, SAM, VIM etc. These are all saved in the PluginConfigurations field of the DisoveryProfile. 

    The PluginConfiguration also includes KnownTypes and so UDT ports will be discovered if creating a discovery profile via API (assuming UDT is installed and thus a KnownType)

    <knownTypes>
    		<ArrayOfstring
    			xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    			xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    			<string>SolarWinds.Orion.Core.Models.Discovery.CoreDiscoveryPluginConfiguration,SolarWinds.Orion.Core.Models.V1</string>
    			<string>SolarWinds.VIM.Common.Configuration.VimDiscoveryPluginConfiguration,SolarWinds.VIM.Common</string>
    			<string>SolarWinds.NCM.Contracts.Discovery.NcmDiscoveryPluginConfiguration,SolarWinds.NCM.Contracts</string>
    			<string>SolarWinds.Interfaces.Common.Models.Discovery.InterfacesDiscoveryPluginConfiguration,SolarWinds.Interfaces.Common</string>
    			<string>SolarWinds.APM.BlackBox.Sql.Common.Models.Discovery.ApmBlackBoxSqlDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Sql.Common</string>
    			<string>SolarWinds.APM.BlackBox.Exchg.Common.Models.Discovery.ExchangeDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Exchg.Common</string>
    			<string>SolarWinds.APM.BlackBox.Wstm.Common.Models.Discovery.DiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Wstm.Common</string>
    			<string>SolarWinds.APM.BlackBox.IIS.Common.Models.Discovery.IISDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.IIS.Common</string>
    			<string>SolarWinds.APM.BlackBox.ActiveDirectory.Common.Models.Discovery.ActiveDirectoryDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.ActiveDirectory.Common</string>
    			<string>SolarWinds.UDT.Common.Models.Discovery.UDTDiscoveryPluginConfiguration,SolarWinds.UDT.Common</string>
    			<string>SolarWinds.Orion.SCM.Models.Discovery.ScmDiscoveryPluginConfiguration,SolarWinds.Orion.SCM.Models</string>
    		</ArrayOfstring>
    	</knownTypes>

    I say discovered rather than imported because there are additional elements in the PluginConfiguration that look to be interesting for UDT

    <DiscoveryPluginConfigurationBase
    							xmlns:d2p1="http://schemas.solarwinds.com/2008/UDT" i:type="d2p1:UDTDiscoveryPluginConfiguration">
    							<d2p1:AutoImportPorts>false</d2p1:AutoImportPorts>
    							<d2p1:AutoImportStatus
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/SolarWinds.Interfaces.Common.Enums">
    								<d3p1:IfAutoImportStatus>Up</d3p1:IfAutoImportStatus>
    							</d2p1:AutoImportStatus>
    							<d2p1:AutoImportVirtualTypes
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
    								<d3p1:boolean>true</d3p1:boolean>
    								<d3p1:boolean>false</d3p1:boolean>
    								<d3p1:boolean i:nil="true" />
    							</d2p1:AutoImportVirtualTypes>
    							<d2p1:AutoImportVlanPortTypes
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Models.Enums">
    								<d3p1:VlanPortType>Access</d3p1:VlanPortType>
    								<d3p1:VlanPortType>Trunk</d3p1:VlanPortType>
    								<d3p1:VlanPortType>Unknown</d3p1:VlanPortType>
    							</d2p1:AutoImportVlanPortTypes>
    							<d2p1:Expressions
    								xmlns:d3p1="http://schemas.datacontract.org/2004/07/SolarWinds.UDT.Common.Discovery.Filtering.Expressions" i:nil="true" />
    								<d2p1:IsNPMDiscoveryPluginLoaded>false</d2p1:IsNPMDiscoveryPluginLoaded>
    							</DiscoveryPluginConfigurationBase>

    There are no API methods available to update these values for UDT, however, I have successfully used direct SQL commands to update other values and behavior. 

    In my initial testing, updating a DiscoveryProfile with the query below and importing the results did not have the expected port types.

    update DiscoveryProfiles set PluginConfigurations = replace(PluginConfigurations,'<d2p1:AutoImportPorts>false</d2p1:AutoImportPorts>','<d2p1:AutoImportPorts>true</d2p1:AutoImportPorts>')

Children
No Data