1 Reply Latest reply on Jul 27, 2017 11:11 AM by tomas.vrabel

    Add polling of NIC, Asset Inventory, and Windows Scheduled Tasks to new WMI node

    pwahrens

      Hello,

      We are currently customizing the CRUD.AddWMINode.ps1 sample script from GitHub to add Windows nodes to Orion. We have been able to add most of the components using the script; however, we do not know how to add polling of the NIC, Asset Inventory, and Windows Scheduled Tasks using the script. Please see the image below for what we are trying to add using the PowerShell script:

       

       

      Thank you for the help!

        • Re: Add polling of NIC, Asset Inventory, and Windows Scheduled Tasks to new WMI node
          tomas.vrabel

          Hello,

           

          Ad NIC:

          For SNMP you can set up interface polling leveraging script https://github.com/solarwinds/OrionSDK/blob/master/Samples/PowerShell/CRUD.AddInterface.ps1.

          Important part is after line 28 - registering specific pollers for interfaces.

           

           

          If you use WMI polling, you need to setup following poller types instead:

          IW.Status.WMI.WinV62

          IW.Rediscovery.WMI.WinV62

          IW.StatisticsTraffic.WMI.WinV62

          IW.StatisticsErrors.WMI.WinV62

           

          and use NetObjectPrefix IW instead of I:

           

          Example:

          $poller = @{

              NetObject = "IW:" + $ifaceProps["InterfaceID"];

              NetObjectType = "IW";

              NetObjectID = $ifaceProps["InterfaceID"];

          }

           

           

          $poller["PollerType"]="IW.Status.WMI.WinV62";

          $pollerUri = New-SwisObject $swis -EntityType "Orion.Pollers" -Properties $poller

           

           

          Ad Asset Inventory:

          Unfortunately seems like adding Asset Inventory polling using SDK API is not supported.

          You can add poller type N.AssetInventory.Wmi.Generic for given node but Orion expects entry

          in [SolarWindsOrion].[dbo].[AssetInventory_Polling] table and this entry cannot be created using SDK API.

           

           

          Ad Windows Scheduled Tasks:

          You can add polling of win tasks using verb Orion.APM.Application.CreateApplication.

           

          Example script to enable polling:

          Invoke-SwisVerb $swis "Orion.APM.Application" "CreateApplication" @(

               # node ID, replace with specific node ID

               2,

           

               # fixed value, template ID for windows schedules tasks

               222,

           

               # fixed value, default credentials

               -3,

           

               # skipIfDuplicate flag

               "true"

          )

           

          As fixed values may change in the future please be careful and test the script before upgrades.

          Specific template ID for windows tasks polling can be resolved by query

          SELECT ApplicationTemplateID, Name, IsMockTemplate, Created, LastModified, ViewID, HasImportedView, ViewXml, CustomApplicationType, UniqueId

          FROM Orion.APM.ApplicationTemplate

          where Name like 'Windows Scheduled Tasks'