GroundWork Monitor counts devices in the foundation database, rather than hosts in the configuration database. This means that the true count that is being compared against the license limit is the number of entries in the Device table in foundation, not the number of hosts.
Devices can be created by the Configuration->Control->Commit or auto-discovery processes, by the reception of SNMP traps, or, if you configure it to do so, by syslog-ng. Also, when you re-IP a host, groundwork creates a new device, in order to preserve the historical data (events) on that device with the right name/IP address. Thus, if you generate a report on events, you will see the events associated with the device as named when the event arrived, not as it is currently named. This is by design.
Download the program devclean.pl if you are running GroundWork 6.1(click on the file name).
(This file exists on GroundWork versions 6.1.1 or greater at /usr/local/groundwork/tools/devclean.pl
Place this file on your groundwork server, and make it executable. This program must be run as root.
Running the program without any arguments gives you a report:
This is what the numbers mean:
Number of devices Total:
This is the current total of all devices in the database, and would be what the license manager would look at.
Number of devices referenced by hosts:
This is how many devices you have that are monitored as Hosts in Nagios (via the Configuration Database). These are what are termed "core" devices. You can't really affect this number without deleting hosts in Configuration.
Number of devices NOT referenced by hosts:
These are the devices that could potentially be removed, since they are not associated with Hosts in Configuration.
Number of devices probably created by traps:
Number of devices probably created by syslog messages:
There are the devices created by the processes other than configuration (traps and logs, respectively).
Total Unused Devices:
This is the number of devices that are no longer referenced. They are kept in the database for historical data preservation only.
You should probably clean up at least the unused devices. Do this by running devclean:
Be aware that doing -cleanup will remove all LogMessage and performance data for these devices from the GWCollageDB (foundation) database.
If you no longer want to use devices created solely by snmptraps, you can also remove them:
Of course, if you do this, the event console will no longer display events for deleted devices.
Perform a commit after this. Please run the devclean.pl script again after a day or so with no arguments to see what devices your system is actually monitoring.
If you do not care about Devices added by the SNMP trap process or syslog, you can make it more aggressive by changing the -cleanup to -cleanall. That will remove every device not in the configuration database. Note: If your GroundWork installation is still receiving snmptraps and/or syslog messages, devices will be newly created and the count will be increased, accordingly. Devices that you do not wish to be in your Total Number of Devices, should not be sending snmptraps or syslog messages to your GroundWork installation.
As of version 0.0.2 of devclean.pl, there is a more aggressive option, forceclean. This option is needed in cases where a device is in the device table, but all log messages pertaining to it have been removed, either by operator intervention, or by data retention processes. In the rare case where cleanup or cleanall does not remove devices NOT assigned to hosts, try the "forceclean" option in addition to cleanup or cleanall to remove these devices as well.
Using this script deletes historical data!
If that data is important to you, you may want to make a backup of the GWCollageDB database. It may not matter to you.
Using the --forceclean option may delete devices that are classified as snmptrap or syslog generated. This is because it removes devices for which no historical massages exist in the database. Such devices may exist if you have been managing the data saved by trimming out old messages. This is by design, and usually desirable.
If are not concerned with retaining any historical data you can delete all the devices from your system:
|This will remove all the event data for all the devices in your system, though, so you might not want to take such a radical approach.|
You can remove ALL the devices in the system with a sql query from the command line:
and then you can log in and access Configuration, remove the unwanted hosts, and commit your configuration again, to re-populate. You may also need to reset the database in this case. See Resetting your GWCollageDB
See Also: Resetting your GWCollageDB