cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Problem with scripting the appinsight for sql template?

So this is an excerpt from a script I was using to copy over the app templates from an old instance to a new one but I noticed it wasn't working fully for the appinsight templates.  It creates the app monitor, but they all stay in "inital polling" forever.  If i click into the edit and test the credential it passes as expected, then submit that and it will start working, but there must be something missing when using the verb.  Using a similar version of the syntax creates the rest of the app monitors and they fire right up.

if($app.templatename -like "AppInsight for SQL") {

                 Invoke-SwisVerb $swisdest "Orion.APM.SqlServerApplication" "CreateApplication" @(

                    #nodeid

                    "$newnode",

                    #applicationtemplateid

                    "$newtemplate",

                    #credentialid, -3 inherits from node

                    -3,

                    #skip if duplicate

                    1

                )

Anyone every tried to use this verb and had it working successfully?

- Marc Netterfield, Github
0 Kudos
3 Replies
Level 9

Hi mesverrum,

the problem has been reproduced by engineers of SAM and is now tracked as issue SAM-9236. We will update the post once this gets fixed and released.

Regards

pawelk

Level 10

I'm not familiar with this verb in particular, but it sounds like the way nodes in general behave when you create them through script but don't add pollers to them. You could verify if that's the case or not.

0 Kudos

Sounds like it, but the are no pollers for Sam apps.  When you create an app it creates all the components, and I checked the db and see roughly what I would expect there for wmi counters and such, but it seems like it never actually kicks off the real initial poll until you edit it.   I think the verb is missing something that the gui does, but im not sure what.

- Marc Netterfield, Github
0 Kudos