So I am trying to see how far I can take the rest api for the network discovery. I have found the below links as well as a few on thwack that all pretty much have about the same level of information.
- https://github.com/solarwinds/OrionSDK/wiki/Discovery
- https://github.com/solarwinds/OrionSDK/blob/master/Samples/PowerShell/DiscoverWmiNode.ps1
- https://github.com/solarwinds/OrionSDK/blob/master/Samples/PowerShell/DiscoverSnmpV3Node.ps1
Just a note I only have NPM, NCM, and SAM at the moment, important latter on for the configuration profiles later on.
We can schedule a network discovery via the API however the only things we can setup is the Core plugin configuration which going off the example lets us specify
IP Address bulk list
IP Ranges
Subnets
Credentials to use to scan
WMI Retry count
WMI Retry interval
We then need to setup the Interface plugin configuration and this allows us to specify the types of interfaces to improt
Status [Up | Down | Shutdown]
Type [Virtual | Physical]
VLAN Type [Trunk | Access | Unknown]
Also we can specify if we just use the Default settings which then ignores the above settings.
Finally we need to combine these and specify a few other settings to build the actual discovery profile.
What polling engine to run against
Should the profile be deleted after it completes
Name for the discovery profile
Job timeout
Search timeout
SNMP timeout
SNMP retries
Repeat Interval
SNMP Port
Hop Count
What SNMP version to use
Import if only ICMP
If duplicate nodes are allowed
So after this we can then combine all these and run the base discovery via the rest API.
Now stating all this, I did some digging and finally found the actual complete XML for the full discovery profile after its built. It is saved in the SQL database, however not accessible via the SWQL infrastructure so either their database manager or full SQL management studio to get to it.
Its in the DiscoveryProfiles table, look at the "PluginConfigurations" field.
Now with all this in hand i built a in application WMI scan using just the Active Directory search for the nodes to discover. After I ran the initial scan I pulled out the XML and discovered there are additional configuration files that can be used.
Dumped as is from the XML i see
SolarWinds.Orion.Core.Models.Discovery.CoreDiscoveryPluginConfiguration,SolarWinds.Orion.Core.Models.V1
SolarWinds.VIM.Common.Configuration.VimDiscoveryPluginConfiguration,SolarWinds.VIM.Common
SolarWinds.NCM.Contracts.Discovery.NcmDiscoveryPluginConfiguration,SolarWinds.NCM.Contracts
SolarWinds.Interfaces.Common.Models.Discovery.InterfacesDiscoveryPluginConfiguration,SolarWinds.Interfaces.Common
SolarWinds.APM.BlackBox.Sql.Common.Models.Discovery.ApmBlackBoxSqlDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Sql.Common
SolarWinds.APM.BlackBox.Exchg.Common.Models.Discovery.ExchangeDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Exchg.Common
SolarWinds.APM.BlackBox.Wstm.Common.Models.Discovery.DiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.Wstm.Common
SolarWinds.APM.BlackBox.IIS.Common.Models.Discovery.IISDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.IIS.Common
SolarWinds.APM.BlackBox.ActiveDirectory.Common.Models.Discovery.ActiveDirectoryDiscoveryPluginConfiguration,SolarWinds.APM.BlackBox.ActiveDirectory.Common
So it looks like we can a config for the app insight tools: SQL, Exchange, IIS and, Active Directory
Also there looks to be a config for Virtual infrastructure and the NCM module.
Not sure what the WSTM is at the moment
And finally looks like the Core and Interface configs are listed as expected.
So with all this information now, does anyone know what the WSTM config is for and do we have a template for the other plugin configuration templates so that we could script this all out by chance? Being that some are listed as "BlackBox" not sure if there is anything we can get but want to ask.
I'm also trying to figure out if its possible via the API to work with the discovery ignore list, I found a link that had some direct SQL manipulation. Can go down this route if possible but would like to keep it API based if possible.