Ad Widget

Collapse

Upgrade path for templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • troffasky
    Senior Member
    • Jul 2008
    • 565

    #1

    Upgrade path for templates

    Scenario:

    Much-used and loved Zabbix installation with [probably] many customisations to factory templates. It's now been updated to the latest version.



    says:

    "It is suggested to modify the templates in existing installations by downloading the latest templates from the Zabbix Git repository and importing them manually into Zabbix".

    Great! If you follow the link to the Git repo and choose the Download option, you get a zip file of the entire source tree. Eventually you will find the templates/ directory with >300 YAML files in it.

    I am trying to work out a procedure here, with the minimum amount of manually anything. The frontend doesn't allow importing more than one file at a time.

    It would be useful to at least rename every template already installed to old_* so I can then import the new ones and move things over, or something like that, but there is no bulk rename option.

    I can't be the only person with this problem, which has been around for at least 15 years:



  • troffasky
    Senior Member
    • Jul 2008
    • 565

    #2
    Originally posted by troffasky
    If you follow the link to the Git repo and choose the Download option, you get a zip file of the entire source tree.
    ...for Zabbix 7.2, not 7.0, so they won't even import!

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      See the dropdown under the word "Source", that's probably defaulting to the "master" branch?

      Change that to the particular Zabbix series you're on, such as "release/7.0", to get the templates for your version.

      You could batch rename all your existing templates via the Zabbix API, but it would require some programming. If you have any JSON-RPC programming experience it's easy; if you don't it may appear impossibly complex.

      If you have SQL query experience you could use SQL queries to update your existing template names in the database, though that's a more dangerous route than using the official API. I wouldn't recommend it.

      Comment

      • marcbou
        Junior Member
        • May 2024
        • 1

        #4
        this is totally ridiculously complicated ! unmodified templates SHOULD BE UPGRADED AUTOMATICALLY TO THE LATEST VERSION !

        Comment

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

          #5
          Originally posted by marcbou
          this is totally ridiculously complicated ! unmodified templates SHOULD BE UPGRADED AUTOMATICALLY TO THE LATEST VERSION !
          I totally disagree.. I would not want anything be done without my consent... Even, if I have not modified those, updates may introduce something that I don't want...

          Comment

          • sg42
            Member
            • Mar 2015
            • 32

            #6
            Originally posted by cyber

            I totally disagree.. I would not want anything be done without my consent... Even, if I have not modified those, updates may introduce something that I don't want...
            When I upgrade my zabbix server and this upgrade also upgrades all unmodified templates, then I it does so with my consent.
            As written from other users. There have to be a better solution than to manually download 300+ Template yaml-Files, and import them one by one to the server.

            Comment

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

              #7
              I would agree with you, if there would be a question during upgrade "do you also want to upgrade templates"... But it is not there, so I better default to not upgrade...
              But I do agree with the rest, its not easy to upgrade things manually in large quantities...

              Comment

              • troffasky
                Senior Member
                • Jul 2008
                • 565

                #8

                Vote for ZBXNEXT-33

                Comment

                • donikatz
                  Junior Member
                  • Jul 2023
                  • 2

                  #9
                  Wow, late to this, but I'm prepping my first server upgrade and was shocked when I came to this part about each template having to be manually imported. How in the world are we even expected to keep track of which templates are at which versions? Most minor release versions, let alone major, usually have template changes, but it looks like the UI only displays the major version number. For example, in my UI, all templates show as "6.4-0" even though my current server and original server installations were newer 6.4.x minor releases. So unless I want to import every single one, I'm supposed to dig through template change docs for every minor version from my current until 7.0.1 and import every one that's had a change since?

                  Comment

                  • dixie2k
                    Junior Member
                    • Jun 2024
                    • 12

                    #10
                    Well since I am a relatively new user of Zabbix and am only using the Proxmox VE Template nut, I must agree this seems way to complex. There must be a better way.

                    Comment

                    • beemo
                      Junior Member
                      • Jun 2023
                      • 8

                      #11
                      Hi,
                      i upgraded 6.0 to 7.0 server and agents to have updates, but in fact i'm confused as new items/triggers doesn't show it seams that is related to templates not upgraded or updated.
                      Now i have to manually update templates ? What a waste of time i'm totally chocked to discover that; more i don't know how to do that correctly an safely.

                      EDIT: i begun to update templates linux agent active then passive => some keys items changed like vfs.fs.size to vfs.fs.dependent.size then all custom triggers,events,alerts,graphs based on those values have to be modified by hand.
                      I understand why it's not automatically upgrade with the rest of the system now.
                      I think an upgrade script could be produce by dev team to verify the impact on template upgrades and what need to be modify and may be propose an automatic change of values to avoid to do all updates by hand.
                      I just scratch the surface of it .. i see the magnitude of the task for big company with thousand of customizations .. Good luck !
                      For me, it's just a week of work and validation with the template upgrade nightmare, my boss qualified the thing as => it's heavy.
                      Regards,
                      Last edited by beemo; 09-09-2024, 17:22.

                      Comment

                      Working...