This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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

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

  • 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.

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

  • 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.

  • Bira,

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

  • 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