Hi Dojo,
Can we create an automation script to perform a manual failover to the offline DMA?
We would like to linked the automation script to a shape in Visio.
Currently we are monitoring the failover status using the generic failover status driver.
Thank you.
Hi Ashwiny,
Directly from a Visio or an Automation Script, it is not possible as far as I am aware but there is an SLNet call that allows this.
Here is a snippet of how this call should be
var request = new SetDrsState(DMAID, offlineAgent.LocalIP) {
ExtraNotifyOptions = SetDrsStateNotifyType.None,
HostingDataMinerID = DMAID,
Online = true,
Options = SetDrsStateOptions.None,
Reason = reason,
};
As a disclaimer do note that this is an internal call and we do not recommend using this, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice. We recommend to instead always use the correct UI or automation options provided in DataMiner Automation, similar to what Miguel Obregon mentioned in his answer, or through our web API.
Hi Ashwiny,
Please could you elaborate a bit more about your use case?
- Why do you need monitor the failover status of the DMA? As you probably know, there is already a UI that shows you this information
- Why do you need to create a script to perform a manual failover switch? Is there a specific reason to implement this script? Is it not an option using automatic failover for your use case?
Hi Ashwiny,
As far as I know there are no method in the Engine class that can trigger a failover switch. Maybe the community can provide you the SLNet calls to perform this action, but keep in mind that it is not only executing the failover switch, you will also need to monitor the status of each agent in the failover to know if this action run smoothly. I saw a similar question: https://community.dataminer.services/question/how-to-display-the-online-failover-dma-in-a-custom-build-visual-overview/?hilite=failover+ui
Since this action is done only on specific situations, it is recommended to use the current UI available.
Hi Miguel,
We would like to create an automation script so that it can be linked to a visual.
Instead of performing DMA failover via system centre >Agents> right click> failover, it will be easier for the operator to execute it via visual.