Hello,
Zabbix 1.6 handles incorrectly importing in case when host and proxy with the same name exist. I believe that having host and proxy with the same name is standard situation and should be supported.
I manually created proxy with the name A. When I imported configuration for host A, I realized that the proxy was gone. I think that this part of code from import.inc.php (line 81):
assumes that the host already exists and simple overruns it.
Since importing of proxies is supported, this part code should be changed to take into account host's status. Checking if host exists should then go in the EndElement handler, since you don't have status information until then.
Cheers,
emir
Zabbix 1.6 handles incorrectly importing in case when host and proxy with the same name exist. I believe that having host and proxy with the same name is standard situation and should be supported.
I manually created proxy with the name A. When I imported configuration for host A, I realized that the proxy was gone. I think that this part of code from import.inc.php (line 81):
Code:
if($host_data = DBfetch(DBselect('SELECT hostid FROM hosts'.
' WHERE host='.zbx_dbstr($data['name']).
' AND '.DBin_node('hostid',get_current_nodeid(false)))))
Since importing of proxies is supported, this part code should be changed to take into account host's status. Checking if host exists should then go in the EndElement handler, since you don't have status information until then.
Cheers,
emir