8 Replies Latest reply on Apr 26, 2017 7:04 AM by njoylif

    Migrating Bulk alerts in NPM12

    Lester Grant

      Good afternoon I'm trying to figure out is there a way to view all the migrated alerts in some kind of spreadsheet format.  I'm working on a standardization between multiple environments and I thought this would be the easiest way to do this.  Thanks in advance. 

        • Re: Migrating Bulk alerts in NPM12

          and reports too...I have same situation....need to standardize across 3 environments.  PITA doing one by one.

          • Re: Migrating Bulk alerts in NPM12
            Jan Pelousek

            Hi, I believe following SQL query (because of internal changes you're unable to use SWQL for this purpose here) will give what you need. This basically looks for the new alert configurations, which origin in the old alerting engine structures.This is just for reference lookup. Won't tell you if the alerts weren't changed after the migration.


            SELECT ac.AlertID, ac.AlertMessage, ac.AlertRefID, ac.Name, ac.Description, ac.ObjectType, ac.Enabled, ac.Frequency, ac.LastEdit, ac.CreatedBy, ac.Category
            FROM AlertConfigurations ac 
            ac.AlertRefID in (SELECT alertdefid FROM AlertDefinitions) 
            ac.AlertRefID in (SELECT alertdefid FROM Alerts)


            Looking for dashboard you can create report with this query as custom sql datasource

            1 of 1 people found this helpful
              • Re: Migrating Bulk alerts in NPM12
                Jan Pelousek

                I created for you the report. There should be enough just to import it. I hope it helps

                2 of 2 people found this helpful
                • Re: Migrating Bulk alerts in NPM12

                  Nice, that will give report/list to make sure I'm not missing anything;

                  Ultimately, I'm looking for a way to migrate all non-canned alerts (or all) from one instance to another.

                  Now, we have the option to export one alert at a time; I'd like to be able to select multiple alerts and export; then import into another instance.


                  Great way to archive Alert configs too.

                    • Re: Migrating Bulk alerts in NPM12
                      Jan Pelousek

                      This is pretty easily achieveable via Orion API. This can be easily accessed by Orion SDK libraries. I prepared the script to demonstrate the principle. The script gets the identifiers of the alerts you filtered by the condition in the query (e.g. Canned=0). Then uses this identifier for the alert export and finally the exported data uses as input for the import to different machine. Please note the import-export doesn't care about the content, so to make all the alerts working after import you need to e.g. have the used custom properties in both systems, same modules installed, smtp servers (if some global are used in actions) and so on.


                      1. Install the Orion SDK from Releases · solarwinds/OrionSDK · GitHub

                      2. Open e.g. powershell ISE, paste following script, edit the source, target addresses and admin credentials

                      3. Enjoy the output

                      Just noting, that repeated launching won't skip already present alerts, but still you can handle it easily if needed.

                      #Region PSSnapin presence check/add
                      if (!(Get-PSSnapin -Name "SwisSnapin" -ErrorAction SilentlyContinue))
                          Add-PSSnapin SwisSnapin -ErrorAction SilentlyContinue
                      $swisSource = Connect-Swis -host $SourceAddress -UserName admin -Password ""
                      $swisTarget = Connect-Swis -host $TargetAddress -UserName admin -Password ""
                      ##Get Alert IDs per defined condition
                      $alertIDs = Get-SwisData $swisSource "Select AlertId from Orion.AlertConfigurations where Canned=0" 
                      foreach($alertID in $alertIDs)
                        $ExportedDefinition = Invoke-SwisVerb $swisSource Orion.AlertConfigurations Export $alertID 
                        Write-Host "Copying: "
                        (Invoke-SwisVerb $swisTarget Orion.AlertConfigurations Import $ExportedDefinition).Name.'#text'
                      3 of 3 people found this helpful