Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i wrote a code to restart QVSs. But it is not able to differ between the cluster nodes, how can I implement it.
QMSClient Client;
Client = new QMSClient("BasicHttpBinding_IQMS");
string key = Client.GetTimeLimitedServiceKey();
ServiceKeyClientMessageInspector.ServiceKey = key;
ServiceInfo[] MyQVS = Client.GetServices(ServiceTypes.QlikViewServer);
for (int i = 0; i < MyQVS.Length; i++)
{
//If this is the one
//{
Client.RestartQVS(MyQVS.ID);
//}
}
In other part of the code I parse the qvsstatus.aspx page to detect the QVSs I need to restart.
Is there code to get this status from the api? I found some status functions in the object list but I'm not able to run it.
Thanks
Jonas
For the status of each cluster i found a solution, but not for the restart.
Status:
Guid[] MyQVSID = new Guid[MyQVS.Length];
for (int i = 0; i < MyQVS.Length; i++)
{
MyQVSID = MyQVS.ID;
}
ServiceStatus[] QVSStatus = Client.GetServiceStatuses(MyQVSID);
for (int i = 0; i < QVSStatus.Length; i++)
{
Console.WriteLine("Service Status:" + QVSStatus.ID + " " + QVSStatus.Name + " " + QVSStatus.Url.DnsSafeHost.ToString() + " " + QVSStatus.ServiceComposition.ToString());
ServiceStatusDetail[] MSD = new ServiceStatusDetail[QVSStatus.MemberStatusDetails.Length];
MSD = QVSStatus.MemberStatusDetails;
for (int j = 0; j < MSD.Length; j++)
{
Console.WriteLine("Service Status Detail:" + MSD
string[] Message = new string[MSD
Message = MSD
for (int k = 0; k < Message.Length; k++)
{
Console.WriteLine("Service Status Detail Message:" + Message
}
}
}
}