2 Replies Latest reply on Jan 28, 2015 10:22 AM by HerrDoktor

    Changes to SDK-Scripts when using NCM 7.3.x

    HerrDoktor

      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

        • Re: Changes to SDK-Scripts when using NCM 7.3.x
          tdanner

          What version were you upgrading from? The big NCM change in 7.3 is that NCM no longer has a separate database - NCM's data goes into the Orion database now.

           

          If you are deleting the Orion.Nodes entry, you shouldn't need to also call RemoveNode - that should be taken care of automatically.

           

          Other than that, things should pretty much work the way they did in previous versions. AddNodeToNCM is still needed when adding a node.