[ZBX-6116] on deleting a host it should be dropped from the internal caches as well Created: 2013 Jan 14  Updated: 2017 May 30  Resolved: 2013 Jan 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 1.8.15
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Harri Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix_server.log    

 Description   

If a host is removed (using e.g. configuration --> hosts --> hostname --> delete), then Zabbix keeps information about it somewhere in the database. Even the housekeeper process doesn't clean this up, as it seems. When a new host with the same name xor the same IP address is introduced later, then this leads to inconsistencies in the database (AFAICT). For example, I got tons of messages in zabbix-server.log complaining about unknown hosts "localhost.localdomain" or other host names that are currently not in use.

A partial workarund is to flush the dhosts and dservices tables. This is highly painful.



 Comments   
Comment by richlv [ 2013 Jan 14 ]

please attach exact copy of the error message

Comment by Harri [ 2013 Jan 14 ]

Attached you can find a small fragment of zabbix_server.log. For 2 IP addresses it complains about localhost.localdomain. zabbix_agentd.conf on these hosts has an explicit "Hostname=somehost.mydomain.com", so how come ?

localhost.localdomain was the default Hostname in zabbix_agentd.conf. I have deleted the discovered host in the Zabbix GUI, fixed the hostname in zabbix_agentd.conf and started the agent again, but somehow the "localhost.localdomain" is still bound to these 2 IP addresses.

Comment by richlv [ 2013 Jan 14 ]

that's a misconfigured agent. well, two of them. there isn't really anything to be fixed on the zabbix side

Comment by Harri [ 2013 Jan 15 ]

Thats interesting, because after truncating the dhosts and dservices tables in mysql the problem went away. The agent configuration hasn't been changed.

Comment by richlv [ 2013 Jan 15 ]

which problem exactly went away ? messages in server log ? that should not be connected in any way...

Generated at Mon Aug 11 06:42:28 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.