Group/Service inconsistencies due to host being deleted
Status: Pre-Alpha
Brought to you by:
rededog027
If a host that belongs to a group is deleted the corresponding entry (or entries) in the hostgroup_members tables is not removed. This results in database errors when attempting to write the Nagios configuration files.
To fix it I have to find out the old host's host_id and run something like:
DELETE FROM hostgroup_members WHERE host_id=XXXX
The only workaround I know of is to make sure the host is removed from all hostgroups before deleting it.
This is the error usually encountered when running 'Write the Config Files':
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 36 in /var/www/nagiosweb/createtxt.php on line 350
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 37 in /var/www/nagiosweb/createtxt.php on line 350
Null entries appear in relevant hostgroup and servicegroup declarations impacted by the host's removal and cause Nagios' pre-flight check to fail.