I have created an automation script that needs local access, hence it needs to be launched on a specific DMA. As far as I'm aware this can be done by connecting with cube to the specific DMA, then go to the Automation module and click on the "Execute" button of the selected automation script.
I need to execute this automation script on every DMA in the cluster. As this needs to be executed on 30 DMAs, it would seem time consuming having to connect the cube client separately to every DMA in the cluster. I was wondering if there's an easy alternative where one can simply select the DMA to execute the automation script or even select multiple DMAs? The DataMiner version where this needs to be executed on is a 9.5 CU10.
Hi Laurens,
From within a script, you can launch a subscript and define the DMA where it needs to run:
Skyline.DataMiner.Net.Messages.ExecuteScriptMessage scriptMessage = new ExecuteScriptMessage()
{
DataMinerID = dma,//DMA ID
ScriptName = scriptname
};
Skyline.DataMiner.Net.Messages.DMSMessage Response = Engine.SLNet.SendSingleResponseMessage(scriptMessage);
Hi Laurens,
In the past, I had to do something similar where I had to run a script on all agents on a daily basis
What I did at the time was configuring in the Scheduler module 1 task per agent that I wanted to execute the script on and configure it to run on the correct agent and with the correct script input data.
If you want to run it periodically you can configure it in such a way, otherwise, you can use the execute now option, and that way you can do it from a single location without having to login into each agent's cube
Hi Laurens,
Other alternatives that could be used for your use case:
- Correlation rule: You can execute multiple scripts from a correlation rule. In the correlation rule you can define from which DMA the script should be executed. For example you can run the same script multiple times from different DMAs:
The tricky part here is to define how you will trigger the correlation rule. A possible option could be using information events (e.g. triggering the correlation rule after a parameter has been set to a specific value)
- Scheduled task: In this case you can create a task that can be executed from a specific DMA. This will trigger the script from the DMA selected:
The advantage is that you will be able to trigger these tasks from one single DMA. The drawback here is that you will need to create a task per DMA in the cluster (although it is only one time job).
Thanks for the idea. I’ve wrapped a loop around it so it iterates over all DMAs that I want to execute the script on.
For completeness if anyone else would be reading this question: I also needed to start the automation script with a parameter, this can be done by adding the options:
string[] options = new string[4];
options[0] = “PARAMETER:3:” + argument; // 3=parameter id, argument = parameter value
options[1] = “OPTIONS:4”;
options[2] = “CHECKSETS:TRUE”;
options[3] = “DEFER:FALSE”;
When defining the scriptMessage, set the Options property:
Options = new Skyline.DataMiner.Net.Messages.SA(options)