Due to a collection issue with the IC agent using the IP address, it was a requirement to force a monitored Oracle database agent to use a different IC agent with a FQDN (Fully Qualified Domain Name) that already successfully collects OS data.
Associate the agent to a new IC agent
1. If not already set, add a hostname alias in the hosts file to use the IP address and the desired hostname.
2. Delete the IC agent for the IP address from the Agent Status dashboard.
3. Execute the following groovy script from the Foglight script console. Replace the HOSTNAME with the desired FQDN name with which IC agent already successfully collects OS data, and DB_Agent_Name with the name of the corresponding Oracle DB agent which is used to monitor the Oracle instance on the host.
agentName = "DB_Agent_Name";
newValue= "HOSTNAME";
propertyName = "monOSHost";
agentService = server.get("AgentService");
configService = server.get("ConfigService");
agents = agentService.findByName(agentName);
if ((agents != null) && (agents.size() > 0)) {
agent = agents.get(0);
} else {
return "No agent found";
}
namespace = agent.getAgentNamespace();
agentType = agent.getTypeId();
primaryAsp = configService.getAgentInstancePrimaryAsp(namespace, agentType, agent.getId());
println "Old value="+primaryAsp.getString(propertyName);
primaryAsp.setValueByString(propertyName, newValue);
configService.saveConfig(primaryAsp);
return "Saved value="+primaryAsp.getString(propertyName);
4. Deactivate and activate the hostname-named IC agent that is being associated with the Oracle agent
5. Go to the Object Cleanup page and click "Data Management Browser", select named with the IP address under the Host Model
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center