The following script will turn off OS monitoring for all SQL Server database agents in a FMS
srvConfig = server["ConfigService"];
srvAgent = server["AgentService"];
namespace = "DB_SQL_Server"
agentType = "DB_SQL_Server"
def updateASP(primaryASP) {
primaryASP.setValueByString("osEnableOsCollections" , "0");
srvConfig.saveConfig(primaryASP);
}
primaryASP = srvConfig.getAgentTypePrimaryAsp(namespace, agentType);
updateASP(primaryASP);
def allAgents = srvAgent.findByAdapterAndType("FglAM", "DB_SQL_Server");
allAgents.each {agent ->
primaryASP = srvConfig.getAgentInstancePrimaryAsp(namespace, agentType, agent.getId());
updateASP(primaryASP);
}
return true;
The following script will turn off OS monitoring for all SQL Server SSAS agents in a FMS
srvConfig = server["ConfigService"];
srvAgent = server["AgentService"];
namespace = "DB_SQL_Server"
agentType = "SSAS_Agent"
def updateASP(primaryASP) {
primaryASP.setValueByString("osEnableOsCollections" , "0");
srvConfig.saveConfig(primaryASP);
}
primaryASP = srvConfig.getAgentTypePrimaryAsp(namespace, agentType);
updateASP(primaryASP);
def allAgents = srvAgent.findByAdapterAndType("FglAM", "SSAS_Agent");
allAgents.each {agent ->
primaryASP = srvConfig.getAgentInstancePrimaryAsp(namespace, agentType, agent.getId());
updateASP(primaryASP);
}
return true;
The following script will turn on OS monitoring for all SQL Server database agents in a FMS
srvConfig = server["ConfigService"];
srvAgent = server["AgentService"];
namespace = "DB_SQL_Server"
agentType = "DB_SQL_Server"
def updateASP(primaryASP) {
primaryASP.setValueByString("osEnableOsCollections" , "1");
srvConfig.saveConfig(primaryASP);
}
primaryASP = srvConfig.getAgentTypePrimaryAsp(namespace, agentType);
updateASP(primaryASP);
def allAgents = srvAgent.findByAdapterAndType("FglAM", "DB_SQL_Server");
allAgents.each {agent ->
primaryASP = srvConfig.getAgentInstancePrimaryAsp(namespace, agentType, agent.getId());
updateASP(primaryASP);
}
return true;
The following script will turn on OS monitoring for all SQL Server SSAS agents in a FMS
srvConfig = server["ConfigService"];
srvAgent = server["AgentService"];
namespace = "DB_SQL_Server"
agentType = "SSAS_Agent"
def updateASP(primaryASP) {
primaryASP.setValueByString("osEnableOsCollections" , "1");
srvConfig.saveConfig(primaryASP);
}
primaryASP = srvConfig.getAgentTypePrimaryAsp(namespace, agentType);
updateASP(primaryASP);
def allAgents = srvAgent.findByAdapterAndType("FglAM", "SSAS_Agent");
allAgents.each {agent ->
primaryASP = srvConfig.getAgentInstancePrimaryAsp(namespace, agentType, agent.getId());
updateASP(primaryASP);
}
return true;
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center