Ad Widget

Collapse

Migrating zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #1

    Migrating zabbix

    Hi,
    As our installation has grown alot we're about to undertake a migration of zabbix from a virtual machine environment to a physical server. In order to maintain data collection we plan to have a period of having both the old and new zabbix servers writing to the new mysql db as we cut agents across to the new server.

    Can I ask, are there any issues with running multiple zabbix servers for a while against the same mysql instance? I believe there won't be but would like to confirm that...


    Regards,
    David
  • Jason
    Senior Member
    • Nov 2007
    • 430

    #2
    I've just seen the support for multiple servers for active checks in 1.8.12. I can imagine this could be used for the process...

    Build your new server... Test it by having a few agents talk in to it. Then dump your database and move it across and the same time change the routing on the traffic to your new server.

    Comment

    • untergeek
      Senior Member
      Zabbix Certified Specialist
      • Jun 2009
      • 512

      #3
      Jason, that's the approach we're taking. We're installing the 1.8.12 agent everywhere and adding a parallel zabbix server to also collect the data. When we're satisfied that everything is working properly, we'll cut off the original and "fail over" to the new one.

      Comment

      • Jason
        Senior Member
        • Nov 2007
        • 430

        #4
        Can you report back on how well that goes?

        There will be a blip in the data from the time you dump the db on the old node to starting it on the new node, but as long as you can live with that should be ok...

        You should be able to write a query though to pull the data from that time period over onto your new server to get rid of the hole... Not quite sure of the structure of the query, but should be possible.

        Comment

        • Yello
          Senior Member
          • Apr 2011
          • 309

          #5
          Hi,
          I understand the logic outlined above and that's fine. I'd like to understand things a little better if you don't mind.

          I ask, is there a 1-1 relationship between zabbix server and database? That is, would it be possible to new and old zabbix_servers talking to the "new" database and migrate hosts from one zabbix_server to the other? My suspicion is that there can only be one zabbix server per db backend otherwise host items would be marked as unsupported by the zabbix server that isn't managing that host but is trying to contact it based on its config.

          If someone can clarify that point I'll appreciate it.


          Regards,
          David

          Comment

          • ghoz
            Senior Member
            • May 2011
            • 204

            #6
            I wouldn't do that :
            multiple zabbix servers on the same database will step on their toes wrt IDs in the database.

            much of the code is 'get max id from table +1' , and IIRC, zabbix caches some of that in memory. meaning 2 zabbixes will have an inconsistent view of the data, leading to strange errors or data corruption...

            Comment

            • Yello
              Senior Member
              • Apr 2011
              • 309

              #7
              Yeah, I suspected as much. Thanks for the confirmation.

              Comment

              Working...