Showing results for 
Search instead for 
Did you mean: 
Create Post

SDK/Powershell - Import Nodes, Interfaces, Volumes, Custom Properties (SDK1.9)

I wrote this for an acquisition migration, and wanted to share with the community. I found the SDK documentation somewhat incomplete, or inconsistent with what was needed for each element.  These are good examples for ping, and snmp V2 node import, interfaces, and volumes, assuming that you know the SNMP indexes for interfaces and volumes. This also has custom property config for all three element types. This does not use the SDK discovery feature, however I plan to use that at some point in a future version.

I'm using this with NPM 10.7 / SDK 1.9.


Darth_Xander - I like the function approach to give you the ability to break out or update those separately.
I like the testing to see if it's not already in the DB but was surprised not to see a Test-Connection to see if the node could be pinged though that assumes the script is running from that poller- are you just relying on import or function errors, would it not continue on and try the next function despite not being able to add node?

That's a good question, and I actually hadn't considered incorporating that as part of the process; I actually wanted to avoid ping testing anything - call me crazy. I have an existing Orion install that will be going away, and I'll be installing an APE at that site to consolidate inventories. I want to get all of the existing inventory in place on the new poller, and then deal with connectivity issues after the import, without having to fight with connectivity limitations during a standard discovery. I know all of the inventory that will be imported is reachable from that site, but it will have a different polling IP.

I tinkered with this a little bit with a separate tool: Inventory Pre-Load Connection Tester (PowerShell) - Have your polling engines test connectivity to ...

lag​ In you script in the sample csv you have given a NCM column what could be the value in it. Can it be yes/no because when you show add node to NCM code in your script, you dont map the NCM column will all the nodes be added to NCM?

On what basis can we differentiate which node to add to NCM and which not to ?

It would be good functionality to have it, and maybe control wether or not you run the PING test. In my case, I needed to cram the inventory into Orion regardless of wether or not it would respond, then let the field techs or networking deal with the connectivity problem.  I have a separate script that pings a list of IP addresses from each polling engine, and I use that in most other cases where a typical discovery will work.

Thanks for posting this.

Version history
Revision #:
1 of 1
Last update:
‎02-17-2015 08:29 AM
Updated by: