Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Changes to SDK-Scripts when using NCM 7.3.x

$
0
0

Hi Folks,

my Customer just upgraded to NCM 7.3.2.

We are still on SDK 1.6

 

We have a script running that parses a CSV File and this script adds/removes/updates Nodes.

With the "old" NCM we were adding/removing/updating Nodes in Both Databases.

e.g.

 

$targetNodeUri = Get-SwisData $target "SELECT Uri FROM Orion.Nodes WHERE IPAddress=@ip" @{ip=$entry.IP_ADRESSE}
$targetNCMUri = Get-SwisData $target "SELECT Uri FROM Cirrus.Nodes WHERE AgentIP=@aip" @{aip=$entry.IP_ADRESSE}
$targetNodeID = Get-SwisData $target "SELECT NodeID FROM Orion.Nodes WHERE IPAddress=@ip" @{ip=$entry.IP_ADRESSE}

 

After the Upgrade it seems only the Removal of Nodes is causing Problems. When we run the Command:

 

                        if($entry ImportedByAPI -eq 1){  $targetNodeUri = Get-SwisData $target "SELECT Uri FROM Orion.Nodes WHERE IPAddress=@ip" @{ip=$entry.IP_ADRESSE}  $targetNCMID = Get-SwisData $target "SELECT NodeID, AgentIP FROM Cirrus.Nodes WHERE AgentIP=@aip" @{aip=$entry.IP_ADRESSE}  Remove-SwisObject $target $targetNodeUri  Invoke-SwisVerb $target Orion.Nodes RemoveNode @($targetNCMID.NodeID)|Out-Null  }

 

Is removing from NCM obsolete?

It is sufficient to just remove the Node from "Orion"

 

 

How about Adding Nodes? We still run the Command  "AddNodeToNCM"

 

Invoke-SwisVerb $target Cirrus.Nodes AddNodeToNCM $newNode.NodeID > $null
$newNCMUri = Get-SwisData $target "SELECT Uri FROM Cirrus.Nodes WHERE AgentIP=@aip" @{aip=$entry.IP_ADRESSE}
Set-SwisObject $target $newNCMUri -Properties $NCMProperties

 

Is this still OK? or do we need to Change this as well.

I was looking for Information on the changes in 7.3.2 but was not able to find any documents. If someone could point me in the right direction this would be great.

The Change to NCM 7.3.2 was a necessary "emergency update" because we were having huge issues with the web-console so now we have to adjust everything that is running in the background as well.

 

Thanks for further Information

Holger


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>