Migrate GSM to Azure App Insights

Anyone had any issues with migrating Global Service Monitor tests to Azure App Insights?

I’m getting failures on all but one of my GSM tests, invariably with the following PowerShell:

Out-File : The given path's format is not supported.
At C:\GSMMigrate\MigrateGSMToAI.ps1:269 char:10
+     "" | Out-File -filepath $testLogFileName -Force
+          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (:) [Out-File], NotSupportedException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

Out-File : The given path's format is not supported.
At C:\GSMMigrate\MigrateGSMToAI.ps1:72 char:23
+ ...   $messageToBelogged | Out-File -Append -filepath $logFileName -Force
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (:) [Out-File], NotSupportedException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

Out-File : The given path's format is not supported.
At C:\GSMMigrate\MigrateGSMToAI.ps1:72 char:23
+ ...   $messageToBelogged | Out-File -Append -filepath $logFileName -Force
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (:) [Out-File], NotSupportedException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

There’s very little on the web about it as it’s ‘just supposed to work’ ?

(I know it was supposed to be done by 07/11 but I have managed to export one test today – I can’t see anything different between the successful one and the unsuccessful ones!)

Hi Peter,

Could you please check the names of your web tests (Authoring Pane -> Management Pack Templates -> Web Application Availability Monitoring in the Operations Console).
One or more web tests probably have characters like : and / (e.g. https://my.website.org).

The PowerShell scripts uses the names of the web tests when migrating to Azure Application Insights and the errors you mention are probably the result of the ‘special’ characters in the names of the web tests.

Renaming your web tests (e.g. https://my.website.org to https-my-website-org) will probably fix this.

Cheers,
Serge.

1 Like

My pleasure :slight_smile:

If both are currently the same I would recommend to change both so that you keep it structured the same way you’re used to but it should suffice to only change the second one (‘URLs to be monitored’-section).

Cheers,
Serge.

Thanks Serge, is that the Friendly Name of the test, or is it the Name in the ‘URLs to be monitored’ section? I guess it’s the second one.