We have a Zabbix server located in Europe that has a VPN link to another server in Asia. We need to monitor from Asia.
The connection in Asia is unreliable and slow. Using the web interface on the European server from Asia is just too slow to be useful, so we needed a better solution.
I have setup the Europe mysql database as a master, and setup replication to the mysql database in Asia. I've done that properly and verified that it worked. Works fine at first.
So now in Asia we are able to use a local web server with this replicated database. It is really fast. We're very happy with this solution.
And then it stopped working.
Upon investigation, the slave (the Asian server) complains that:
What happens is (I think) that the Asian mysql gets data (e.g. from php frontend) and updates its local database. Then the master (Europe) sends a replication update and there is a 'unique' constraint that is violated.
I wanted to know if anyone has worked with a similar setup (using a replicated DB) and if there is a solution.
Alternatively, if you have any suggestions on how to do this differently, I'm interested.
The key points:
- We can't run the Zabbix server in Asia because the connection there is highly unreliable and we might loose events simply because our connection is unstable.
- We therefore run it in Europe. But then when monitored from Asia, the VPN connection is so slow that even the most patient monitoring staff would give up after 10 minutes.
Thank you for your insights.
The connection in Asia is unreliable and slow. Using the web interface on the European server from Asia is just too slow to be useful, so we needed a better solution.
I have setup the Europe mysql database as a master, and setup replication to the mysql database in Asia. I've done that properly and verified that it worked. Works fine at first.
So now in Asia we are able to use a local web server with this replicated database. It is really fast. We're very happy with this solution.
And then it stopped working.
Upon investigation, the slave (the Asian server) complains that:
Code:
Error 'Duplicate entry '21' for key 'PRIMARY'' on query. Default database: 'zabbix'. Query: 'INSERT INTO auditlog (auditid,userid,clock,action,resourcetype,details,ip) VALUES (21,3,1284105286,6,11,'User status for group name [Disabled]','10.130.0.3')'
I wanted to know if anyone has worked with a similar setup (using a replicated DB) and if there is a solution.
Alternatively, if you have any suggestions on how to do this differently, I'm interested.
The key points:
- We can't run the Zabbix server in Asia because the connection there is highly unreliable and we might loose events simply because our connection is unstable.
- We therefore run it in Europe. But then when monitored from Asia, the VPN connection is so slow that even the most patient monitoring staff would give up after 10 minutes.
Thank you for your insights.
Comment