Hi All,
We changed the polling method of our servers from SNMP to WMI. However, I noticed that the interfaces/ resources discovered from SNMP are still remain upon checking the node. Now, is there a way to change the polling method that will remove the existing resources for bulk changing the polling method as well as for single changing?
Thank you very much for the usual assistance.
Hello,
You can list resources nodes one by one OR
Before every change we recommend backup your database.
1. Please download Orion SDK:
http://knowledgebase.solarwinds.com/kb/questions/5811/Downloading+the+SolarWinds+Orion+SDK
or from here https://github.com/solarwinds/OrionSDK/releases
2. Install it on machine where you will run the script (can be main poller too)
3. Put this code to new powershell script file:
if (!(Get-PSSnapin -Name "SwisSnapin" -ErrorAction SilentlyContinue))
{
Add-PSSnapin SwisSnapin -ErrorAction SilentlyContinue
}
$hostname = '10.140.26.228' #put your Main poller hostname, if you run it from local machine you can put localhost, you can put IP address of main poller too
$swis = Connect-Swis -username "admin" -password "" -host $hostname #change to your Orion Admin credentials
$swisQuery = "select I.uri from Orion.NPM.Interfaces as I
JOIN (Select nodeid from Orion.nodes where ObjectSubtype='WMI') as N ON n.nodeid=I.nodeid
where I.ObjectSubType='SNMP'"
(Get-SwisData $swis $swisQuery) |Remove-SwisObject $swis
4. Fill Hostname and your admin credentials to Orion
5. Run with powershell.
6. Right click to script and click "Run with powershell" or run powershell console and browse the file and run it .\script.ps1
It should delete all SNMP interfaces connected to WMI nodes, you will lost all statistics data from that interfaces of course.
Lada
Thanks LadaVarga for providing the solution. Anyhow, is there a way from NPM side to remove the SNMP interfaces which connected to the WMI?
Thank you.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.