There are some cases where it may be useful to use a command line interface for removing hosts out of the Monarch (or Configuration) subsystem of GroundWork Monitor. One particularly useful case is on a GroundWork Monitor Enterprise Edition system where hosts have been added to Monarch via the Auto Discovery process, such that the total number exceeds the license limit for the installation. If a commit of the Configuration is done as part of that Auto Discovery process then the web interface of GroundWork Monitor may become unavailable. Support is providing a tool in this article to allow for specified hosts to be deleted out of the Monarch subsystem and then for a commit operation to be performed. This will cause the hosts to be removed out of both the Monarch and Foundation subsystems. It may also be necessary to run a second tool against the Foundation subsystem to fully clean the Foundation subsystem of these extra hosts. The article describing that tool is found at How-to Determine and adjust your device count.
The script and steps described in this article have been tested with GroundWork Monitor Enterprise version 6.2, but the should work the same for versions 6.0 and higher.
Download the delete_hosts.pl script from this article and install in /usr/local/groundwork/tools. Change ownership and permissions on the script so that it looks like the example below:
The script can be run without options, which will cause it to show a list of hosts and ask you to select which ones you wish to delete:
You may also choose to supply the script with a list of hosts in a separate file:
In both cases you are prompted as to whether you wish to perform a commit operation. You will want to make sure no one is using the web Configuration tool before doing any commit. Prompting for a commit operation can be overridden by a command line option so that the commit is automatically done after host deletion: