Hi All,
We have a distributed zabbix set-up version 1.8. One zabbix server node (not a proxy) and one zabix master server. When we add a new host configuration to the zabbix node with the use of the zabbix API. We end up with errors in the master server zabbix logs stating "NOT OK" which displays when the event sync is trying to take place between the node and the master. These errors stop once the configuration sync takes place between the node and master, and the new host config then exists on the master.
To try and stop these errors i've done the following. Add the host via the API in an already disabled state, set-up maintenance period of 5 mins (should be enough time for the config sync to master to complete), and then re-enable the host. The idea being that no checks etc should happen because the maintenance period should be taking care of that. However this isn't solved, and I've noticed that even with setting up the active maintenance period that checks are still being carried out? Not sure why that is! Maybe because i set the host to enabled status again via a host.update to "status"= enable API request to the node? Which i presume means the maintenance DO NOT MONITOR setting and the host DISABLE MONITORING setting are perhaps one of the same? I don't know, i'm stuck really, and need to find a way to add a host so that the errors stop going into the log file just because I'm adding a new server
Cheers for any ideas,
Mark
EDIT: Have since got something working at least. Add host in disabled state, add host to all required Groups, Wait 150 seconds as config sync takes place approx every 2mins so wait 2 and half mins until enabling host. Enable Host. All of this run via the Zabbix API. Seems to solve the problem, though I still think this is a problem which should be properly resolved.
We have a distributed zabbix set-up version 1.8. One zabbix server node (not a proxy) and one zabix master server. When we add a new host configuration to the zabbix node with the use of the zabbix API. We end up with errors in the master server zabbix logs stating "NOT OK" which displays when the event sync is trying to take place between the node and the master. These errors stop once the configuration sync takes place between the node and master, and the new host config then exists on the master.
To try and stop these errors i've done the following. Add the host via the API in an already disabled state, set-up maintenance period of 5 mins (should be enough time for the config sync to master to complete), and then re-enable the host. The idea being that no checks etc should happen because the maintenance period should be taking care of that. However this isn't solved, and I've noticed that even with setting up the active maintenance period that checks are still being carried out? Not sure why that is! Maybe because i set the host to enabled status again via a host.update to "status"= enable API request to the node? Which i presume means the maintenance DO NOT MONITOR setting and the host DISABLE MONITORING setting are perhaps one of the same? I don't know, i'm stuck really, and need to find a way to add a host so that the errors stop going into the log file just because I'm adding a new server
Cheers for any ideas,
Mark
EDIT: Have since got something working at least. Add host in disabled state, add host to all required Groups, Wait 150 seconds as config sync takes place approx every 2mins so wait 2 and half mins until enabling host. Enable Host. All of this run via the Zabbix API. Seems to solve the problem, though I still think this is a problem which should be properly resolved.