Details: Host target was added manually, agent was deployed successfully, the host name is an IP address, dns is not working here.
Now the IP address was changed, I can not add a new host using the new address, because em says the agent base directory is not empty...
I just want to add a new host without removing the previous agent installation.
Or even simpler, change the configuration of the existing host (that is name displayed in EM and host IP address).
I am somewhat confused, it seems to be not possible, or I cannot see it after searching quite some time through the different menus and the documentation.
If the host and the agent target names have an IP address in them, and the IP address is now changed, you will have to uninstall and reinstall the agent. This is a reason for not using an IP address in deploying an agent.
When you install/reinstall an agent, the agent base directory has to be empty as per this install guide:
We have tested steps to re-point an existing agent to a new OMS without requiring re-push of the agent binaries. The same steps should work for what you are trying at achieve, although note you will have to remove the original targets, so target history will be lost. The only piece this avoids is re-push of the agent binaries. The steps are:
1. Shut down the running 12c agent with the below command:
$AGENT_INSTANCE_HOME/bin/emctl stop agent
2. Remove the agent instance home:
rm -rf $AGENT_INSTANCE_HOME
3. Manually remove the targets monitored by the agent in the EM console.
4. Create a new instance home pointing to the new oms:
AGENT_BASE_DIR=<location of the agent base dir> OMS_HOST=<oms hostname>
EM_UPLOAD_PORT=<http/https upload port>
@ AGENT_REGISTRATION_PASSWORD=<registration password>
AGENT_INSTANCE_HOME=<absolute path where the instance home has to be created>
We will get these steps added to the official documentation. Let us know if you run into difficulties.