5 Replies Latest reply on Mar 19, 2015 8:14 AM by bira.jr

    Is it possible to update multiple Node Names without using SQL?

    bira.jr

      Hi,

       

      I'd like to know if it is possible to update multiple Node Names without using SQL, I mean, is it possible to do it with a spreadsheet, just like importing custom properties?

       

      Thanks,

       

      Bira

        • Re: Is it possible to update multiple Node Names without using SQL?
          bira.jr

          For those who are still seeking an answer, it is possible to do so running a script to update multiple node names on Windows PowerShell.

            • Re: Is it possible to update multiple Node Names without using SQL?
              finzupa1a

              Still wish you could do it on an import, but that would be better than nothing.  Think you could share the script with us?

                • Re: Is it possible to update multiple Node Names without using SQL?
                  bira.jr

                  I'm sorry for my late response.

                   

                  First of all, install Orion SDK on Orion Server and read the technical reference guide (starting on page 34). There you'll have all the info you need.

                   

                  Now how your node names will be like depends on the name pattern you want to adopt. If you want multiple nodes to have the same "Caption", it is easier.

                   

                  Example:

                  add-pssnapin swissnapin

                  $swis = connect-swis

                  Get-SwisData $swis 'SELECT N.Uri FROM Orion.Nodes WHERE vendor like @C' @{C='%Cisco%'} | Set-SwisObject $swis -Properties @{Caption='Router'}

                   

                  This will update all node names where vendor is Cisco to 'Router'.

                  You can build a script to update node names as you wish.

                    • Re: Is it possible to update multiple Node Names without using SQL?
                      fatset5

                      Bira,

                       

                      Would this also work to update the alerts if the alerts are based on node name?

                        • Re: Is it possible to update multiple Node Names without using SQL?
                          bira.jr

                          Hi,

                           

                          It depends on what change you'd like to do. Here there's a table extracted from SWQL Studio that shows all the operations you can do using Windows Powershell.

                           

                             

                          NameMethodNameEntityName
                          AcknowledgeAcknowledgeOrion.AlertStatus
                          AddNoteAppendNoteOrion.AlertStatus
                          MigrateAllAdvancedAlertsMigrateAllAdvancedAlertsOrion.AlertConfigurations
                          MigrateAdvancedAlertMigrateAdvancedAlertOrion.AlertConfigurations
                          MigrateAdvancedAlertFromXMLMigrateAdvancedAlertFromXMLOrion.AlertConfigurations
                          ReportIndicationReportIndicationOrion.AlertIndication
                          ReportIndicationReportIndicationOrion.AlertTriggered
                          ReportIndicationReportIndicationOrion.AlertUpdated
                          ReportIndicationReportIndicationOrion.AlertReset
                          CreateCustomPropertyCreateCustomPropertyOrion.AlertConfigurationsCustomProperties
                          CreateCustomPropertyWithValuesCreateCustomPropertyWithValuesOrion.AlertConfigurationsCustomProperties
                          ModifyCustomPropertyModifyCustomPropertyOrion.AlertConfigurationsCustomProperties
                          DeleteCustomPropertyDeleteCustomPropertyOrion.AlertConfigurationsCustomProperties
                          ValidateCustomPropertyValidateCustomPropertyOrion.AlertConfigurationsCustomProperties