We have some SAM applications behaving weird (flipping between Up and Unknown) every now and then, and we would like to automate the process of enabling debug logging on them. Currently, we have to manually identify said applications, and manually enable debug logging. This can take quite some time because changing the settings of multiple IIS applications is time consuming, and then we must wait for the logs to catch whichever errors are thrown.
I have attempted a Python script that automatically does this through SWIS, trying to call: /Create/Orion.APM.ApplicationSettings to enable (create) the debug logging setting, but this was without luck.
Has anyone attempted something similar and succeeded? The best I could come up with was a script that returns links to the troublesome applications that don't already have debug logging enabled, but this still requires someone to manually enable it.
In short, my question is: can debug logging be enabled on applications through SWIS?