Hello,
I am having an issue with modifying Dashboard files in a Dataminer agent via an installation package automation script. I can successfully modify the files in the agent where the install package is run, however the files do not successfully sync to the other Dataminer agents in the cluster. Is there a way to force a sync to occur via an automation script? The equivalent of going to the Client Test Tool and clicking "Force Sync DMA/DMS".
Any advice would be much appreciated.
Hi,
With this automation script you can sync the DMS.
note: 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.
Replace 'your_dataminer_id' by the DataMiner id of your agents.
using System;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Net.Messages.Advanced;public class Script
{
public void Run(Engine engine)
{
SetDataMinerInfoMessage request = new SetDataMinerInfoMessage();
request.bInfo1 = 0;
request.bInfo2 = 2147483647;
request.DataMinerID = your_dataminer_id;
request.ElementID = -1;
request.HostingDataMinerID = your_dataminer_id;
request.IInfo1 = 2147483647;
request.IInfo2 = 2147483647;
request.What = 64;
Engine.SLNet.SendSingleResponseMessage(request);
}
}
Regards,
Hi,
As extra note, you could also sync a single file across the DMS. In this case you could use the following values for the request:
request.bInfo1 = 2147483647;
request.bInfo2 = 2147483647;
request.DataMinerID = your_dataminer_id;
request.ElementID = -1;
request.HostingDataMinerID = your_dataminer_id;
request.IInfo1 = 2147483647;
request.IInfo2 = 32;
request.StrInfo1 = @”C:Skyline DataMinerYourDashboard.dmadb.json”;
request.What = 41;