Cannot change shell for DBO properties changes globally
Under Edit Properties for all DB you are not able to edit agent properties globally but you must do it at all levels.
We wanted to change from KSH to BASH in agent properties for all DBO agents but cant find a way to do it without manually going in and editing each agents properties from Agent Status dashboard.
If you wanted to change shell in all agents, you could run the following script for example, which would change from KSH to BASH. You would run this from the Foglight Script Editor.
configService = server["ConfigService"];
namespace = "DB_Oracle";
//// Get oralce agents
def agentlist = #!DBO_Agent_Model#.topologyObjects
for (agent in agentlist) {
agentType = agent.get("type");
//if not RAC agnet do
if (!agentType .equals("DB_Oracle_RAC")) {
agemtId = agent.agentID + ""
// Get primary ASP object
primaryAsp = configService.getAgentInstancePrimaryAsp(namespace, agentType, agemtId);
// Set field value
primaryAsp.setValueByString("osShellTypeUnix", "BASH");
// Save the changed ASP
configService.saveConfig(primaryAsp);
}
}
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center