After removing an agent from Foglight Data Management dashboard and re-adding it, does not show up on the dashboard, although the agent process is running on the monitored host.
The association between the agent and the HostModel in the topology tree has been broken when the agent was deleted. Hence the agent is not present when it is recreated. Looking under the "Foglight4Model" in the data management page, the agent will be present
To fix this, run the attached script via the fglcmd command in the Foglight bin directory. This will rebuild the agent-Host connections in the topology tree.
The syntax is
fglcmd -usr <USER> -pwd <PASSWORD> -cmd script:run -f <PATH_TO_SCRIPT>
fglcmd -usr <USER> -pwd <PASSWORD> -cmd script:run -f addAgentsToExistingHosts.groovy