I'm trying to run a PowerShell script in the background of a DMA upgrade, that needs to perform some actions after the DMA is up and running.
What should I check on my script (SL processes for example), to know if the DMA is up and running?
Hi, that is depending on the options that are available.
-The most easy thing to do is make a connection via SLNet and verify there if the DMA is up and running. But the downsides then are that credentials are needed to make the connection and these need to be stored safely somewhere. Second downside is that because of the upgrade the connection could not be compatible anymore (so you would need to make sure that it's using the same compatible client like the upgrade does).
-Checking SL processes is no guarantee that the DMA is fully started up. For example the SLProtocol process will be active, but elements are still starting up.
-A possibility could be checking the log files: SLWatchdog2.txt contains a log line "Startuptime sent...". SLDataMiner.txt contains a log line like "CServiceModule::RunFunc|CRU|0|Startup DataMiner succeeded in ". Downsides there are that logging files can get overwritten, the format of the logging is not guaranteed and could change. If the DMA is ever running in the cloud then there will also be no direct access to the log files anymore.
->It feels like the solution should come from inside the DMA itself instead of an external PowerShell e.g. through an automation script. This way the automation script has access to the SLNet connection to detect the full startup and could also launch a PowerShell script if really needed to perform some actions.
Hi Tiago,
There's currently no exact call to know when a DMA is fully started.
However you can monitor the logs to see if everythingis loaded. One of the items you can monitor is the logging of SLWatchdog2 where you have a logline "Startuptime sent...". However this is no guarrantee everything is loaded.
You'll need to check if enough is loaded to start your powershell script.
Hi Tiago,
As Laurens mentioned, whatever you want to do you probably want to trigger from within the DMA itself.
When DataMiner startup is complete, it will generate an information event.
You could then use correlation to trigger on this event and execute an automation script to take any actions you want to perform.