Ad Widget

Collapse

Upgrading RH7 linux system from zabbix 5.2 to zabbix 6.0 question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmurtey
    Member
    • Mar 2020
    • 91

    #1

    Upgrading RH7 linux system from zabbix 5.2 to zabbix 6.0 question

    We would like to upgrade our Redhat 7 Linux server from 5.2 zabbix system to 6.0. Is there a easily understandable step by step that can show us how to do the upgrade on this same system.

    TIA
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    If you're using the official Zabbix packages, Zabbix stopped supporting RHEL 7 for server operations, so you're going to need to have a newer version of RHEL for your Zabbix server.

    I'm in roughly the same situation as you, though my site is using the 5.0 LTS rather than (now unsupported) 5.2.

    This isn't step by step, but I can give you a rough outline of what I'll be doing.

    My plan is to back up my current Zabbix server, including a full database backup and the server config files, and then do a fresh reinstall of the system, probably using RHEL 8.6. I'll install PHP and MariaDB that are as close as possible in version to the versions I'm currently using on RHEL 7, and then reload my database from backup and get the various config files in place. We use a configuration management system and provision our RHEL systems using kickstart, so the reinstall and getting system ready should be pretty quick and easy.

    Once the system is ready for Zabbix, I will install the exact same version that I was using under RHEL 7.x. For me, that will be 5.0.30 (or later, whatever is stable in the 5.0 series when I do the upgrade).

    Once I have Zabbix running stable on the new OS, without any new issues, then I start preparing the system for a later version of Zabbix.

    That would start with upgrading PHP (if necessary) from the version I was using for Zabbix 5.0 to something newer that works with both 5.0 and the 6.0 LTS. That might mean PHP 7.3.x, or perhaps PHP 7.4.x. I haven't checked recently, but that would be the first step. Run Zabbix 5.0 LTS for a while with the newer PHP. It's possible this step won't be required for 6.0 LTS, if I'm running a recent-enough version in the PHP 7.2.x series.

    Next, I would update the MariaDB version to whatever is required by Zabbix 6.0. For me, that probably means going from MariaDB 10.3.x to MariaDB 10.5.x. Run the mysql-database-upgrade script, to make sure the database itself is upgraded for MariaDB 10.5.x. I might need to make some database config changes too, since at least one of my current database settings is (I think) deprecated in later versions of MariaDB.

    From that point, it's relatively simple. Change the repo config to point to the repo for whatever version of Zabbix (e.g. 6.0 LTS) or download all the Zabbix packages I need and install them via yum/dnf. Run zabbix-server and let it upgrade my database to the 6.0 schema, and re-run through the web frontend install.php, just to make sure it doesn't notice any missing requirements.

    Once the 6.0 LTS basics are working, apply the manual SQL patch for indexes in some of the history* tables.​

    Comment

    • pmurtey
      Member
      • Mar 2020
      • 91

      #3
      Hi Tim,host
      If we chose not to worry about the historical metric information, is it possible to just upgrade the server to 8.6 like you said do a fresh install of 6.0 and then copy over the Hosts and Templates xml files and start fresh? Would those two files contain all the Items and triggers that were configured? And the host groups and the users?

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I've never tried that so I'm no expert on it, but I think in theory that should work. Import the templates first, so they're in place, then the hosts.

        I don't see any export option for host groups or users, so my guess is you would need to recreate those manually, although looking at what's in the "hosts" XML export, it's possible the host groups will be recreated, but I'm not certain. Again, I've never tried it.

        You also need to consider any media type customizations, action customization, and notifications you've created, as all of those would need to be somehow moved to the updated system too.

        I'm very wary of the XML export/import functionality, especially between major versions. I've been watching these forums for a long time, and problems or errors trying to import templates is a frequent issue that people post about. It seems like it's even more fraught when the export was from an older version of the product.

        If you're going to try this, my recommendation is you set up a small VM or some kind of a test environment, maybe on an old server you aren't using. It doesn't have to exactly match the RAM and storage specs of your current server, it just has to be RHEL 8.6, so you can install Zabbix 6.0.x and test all of the imports and see if they work.

        Good luck! If you pursue this route, please follow-up in this forum thread, to let other people know the results (good or bad). I'm sure it would be helpful to some people to know what went well and what didn't go well.​

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          compared to tim.mooney I would go (and I did go) completely other way.. Went from 4.4 to 6
          I set up parallel environment, as new versions as possible (and supported by the version you are going to...)
          I added OLD version DB schema to NEW DB and transferred all the data (export to csv, import from csv). I did also add those primary keys which were missing in 4.4 but appeared somewhere in 5(?) and which needed all that conversions later. Just to avoid those conversions... going from 5 to 6 you may not need this.
          Then started up NEW zabbix, which did all the necessary DB tricks and started up... To save time, you can transfer only minimal amount of history and trends (latest 1-2 days maybe) and later copy the rest of it over (export from one, import to other. Tables and structures are same, so no no issues, beware of duplicate entries in older versions, where no primary keys were present).
          Of course at first did it on test env..

          Comment

          • pmurtey
            Member
            • Mar 2020
            • 91

            #6
            Thanks gentlemen for your input. Its beginning to sound like this application is not made for easy upgrading. We wouldn't even be thinking about this if it weren't for the zabbix_agent2 issue. From what we could decipher in the downloads page and the documentation the zabbix_agent2 is only supported on 5.0 LTS which is a different version from the 5.2 and 5.4 paths, so the zabbix_agent2 is not available to us, correct? Why would they put it into 5.0 and not the following version updates? Makes no sense.

            Comment

            • cyber
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Dec 2006
              • 4807

              #7
              I don't get what you mean with "not available to us"... zabbix_agent2 is present on all versions, since ... 4.4.something...

              Comment

              • pmurtey
                Member
                • Mar 2020
                • 91

                #8
                Hi Cyber, We were looking for the Agent-2 for Linux servers. We were going by the "Zabbix Packages" under the" Download and Install Zabbix" page (Attached). The chart shows the Agent 2 showing up under the 5.0 LTS version, and 5.2 and 5.4 are not shown. We looked under "Zabbix Agents" page the Agent-2 only shows a windows agent-2 installer. Nothing for Linux. If you are saying the agent exists somewhere on our current 5.2 deployment as a binary. Could you share where that location is for us?
                Attached Files

                Comment

                • tim.mooney
                  Senior Member
                  • Dec 2012
                  • 1427

                  #9

                  Comment

                  • pmurtey
                    Member
                    • Mar 2020
                    • 91

                    #10
                    Thanks Again Tim

                    Comment

                    • cyber
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Dec 2006
                      • 4807

                      #11
                      yeah, what Tim said.. Download page shows you LTS versions plus latest non-lts and a latest beta... For rest of them you should look around in repo.zabbix.com

                      Comment

                      • pmurtey
                        Member
                        • Mar 2020
                        • 91

                        #12
                        Hi All, Our goal in trying to get the zabbix_agent2 (which we downloaded for 5.2 - thank you) was to get the Docker integration working. But then after further review of the Docs, it makes it sound like Docker is only supported on 6.2. Is this correct? We have to be on 6.2 in order for Docker to work? Docs - https://www.zabbix.com/integrations/docker


                        Comment

                        • Markku
                          Senior Member
                          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                          • Sep 2018
                          • 1782

                          #13
                          In git.zabbix.com you can use the dropdown menu to select for example "release/5.0". The same in the Zabbix documentation, there is a menu in the top.

                          Markku

                          Comment

                          • cyber
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified Professional
                            • Dec 2006
                            • 4807

                            #14

                            as Markku pointed out...

                            Comment

                            • pmurtey
                              Member
                              • Mar 2020
                              • 91

                              #15
                              HI Cyber, We went to the link you recommended above and read the info there, but we don't understand where the plugin is that they are referring to. Where do we get that? From the Document "Setup and configure zabbix-agent2 compiled with the Docker monitoring plugin."

                              Comment

                              Working...