Ad Widget

Collapse

Error importing previously exported and generalized template on 6.05

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nils2
    Junior Member
    • Apr 2011
    • 26

    #1

    Error importing previously exported and generalized template on 6.05

    Since cloning a template refuses to work under Zabbix 6.05 (see: https://www.zabbix.com/forum/zabbix-...mplate-in-6-05), I decided to try to export and then re-import the template under a different name for customization. So I exported the "Linux by Zabbix agent" template to YAML, changed its name, changed all UUID instances in the file and tried to import it. It was all green on the import merge/overview screen, but importing failed with the following message:

    Import failed
    Trigger "Configured max number of processes is too low" already exists on "Linux by Zabbix agent".

    Which makes no sense. Any object name within a template should be able to co-exist with other independent templates using the same object names. It has worked fine in 4.x and all previous versions. Never tried in the 5.x series, but I suspect it should work there as well. Please help. These errors make upgrading to v6 LTS very difficult. The template handling functions seem to be seriously broken at places. I can provide any extra info for this and the above mentioned issue as well.
  • Answer selected by nils2 at 10-06-2022, 16:22.
    Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    So in the exported yaml you modified all these:
    1. changed the template name in template and name (lines ~11-12)
    2. went through all the 100+ uuid lines and changed them (to some new unique values)
    3. went through all the 100+ trigger expression lines (also in dependencies) and changed the template names in there
    4. went through all the host lines in the graphs and changed the template names in there
    5. went through all the host lines in the dashboard pages and changed the template names in there
    (did I miss some occurrences of the template name in the yaml export...)

    Is that correct?

    Markku

    Comment

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

      #2
      What I would do in that situation is I'd try to repeat the issue with a minimum setup: create very small template, export, modify and import it. If the problem occurs, it's then easy to open a support ticket.

      Markku

      Comment

      • nils2
        Junior Member
        • Apr 2011
        • 26

        #3
        The Linux template is a fairly complex one with all the bells and whistles one can imagine. It's pretty good at what it's aimed to do. So... if a very simple template causes the same issue, then it's a bingo hit, but if not, I still have the error with the more complex template that I really wanna use. I could imagine, however, that since it's an upgraded system, the devs might have not handled a few corner cases and some settings can cause issues with certain templates. I agree that a repeatable test case would be best. I don't want to start my system from scratch, but I might try the same things on an equal, but freshly deployed and latest Zabbix 6 LTS server. I will also try with a simple template just in case as you suggested.

        Comment

        • nils2
          Junior Member
          • Apr 2011
          • 26

          #4
          Some additional info. I've deployed a 6.05 server with docker, using the Zabbix provided docker-compose files. Using Zabbix Server 6.05, NginX frontend, MySQL 8.0 images.

          In the clean Docker setup: exporting, cloning, importing works as expected. BUT: can't import the template exported in the upgraded (4.2->6.05) setup. Throws the same error as in the first post.
          In the 4.2 -> 6.05 upgraded setup: importing the file created in the Docker env works. BUT, cannot clone the imported template (throws errors as shown in my other thread).

          So a freshly installed Zabbix works with templates as expected, but there are issues on upgraded systems. It's my home lab so not a real issue, but I'm planning to upgrade another system with several hundred live hosts (from 4.0 to 6.0) and this situation is a bit depressing as I can't start that one from scratch. I want to keep all data and configs, customizations, etc.

          Comment

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

            #5
            can't import the template exported in the upgraded (4.2->6.05) setup
            Do you mean that you
            1. upgraded an existing Zabbix installation from 4.2 to 6.0.5
            2. exported the template
            3. built a new 6.0.5 installation that doesn't have that exported template previously installed
            4. tried to import that exported template (unmodified) and you got errors?

            Markku

            Comment

            • nils2
              Junior Member
              • Apr 2011
              • 26

              #6
              1. Exported the template in the upgraded system - the template exists in a 6.05 default installation (not in the upgraded one) and downloadable as "factory" template from the Zabbix Git
              2. "Generalized" the template by changing all UUID strings in the yaml
              3. Changed the name in the yaml
              4. Attempted to import the template in the freshly installed 6.05
              5. Observed the error:

              Import failed
              Trigger "Configured max number of processes is too low" already exists on "Linux by Zabbix agent".

              Comment

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

                #7
                So in the exported yaml you modified all these:
                1. changed the template name in template and name (lines ~11-12)
                2. went through all the 100+ uuid lines and changed them (to some new unique values)
                3. went through all the 100+ trigger expression lines (also in dependencies) and changed the template names in there
                4. went through all the host lines in the graphs and changed the template names in there
                5. went through all the host lines in the dashboard pages and changed the template names in there
                (did I miss some occurrences of the template name in the yaml export...)

                Is that correct?

                Markku

                Comment

                • nils2
                  Junior Member
                  • Apr 2011
                  • 26

                  #8
                  Hmm, you're on to something. I'll need to fix the places where the original name string is used, thanks for pointing that out. It's actually pretty stupid to use the name as a reference within the template, but that's how it is, right now. I'll test the new changes soon.

                  Comment

                  • nils2
                    Junior Member
                    • Apr 2011
                    • 26

                    #9
                    OK, the name change everywhere in the exported yaml fixed it, thanks!

                    Now the only remaining problem with this update is in my other thread.

                    Comment

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

                      #10
                      Nice!

                      Easier way than editing the yaml manually is to take a Full clone of the template and save it with a new name, that way the UUIDs and name references are automatically using suitable values. (Oh I now see your other thread... I'll still leave this comment here for others to see)

                      Markku

                      Comment

                      • nils2
                        Junior Member
                        • Apr 2011
                        • 26

                        #11
                        Originally posted by Markku
                        Easier way than editing the yaml manually is to take a Full clone of the template and save it with a new name, that way the UUIDs and name references are automatically using suitable values. (Oh I now see your other thread... I'll still leave this comment here for others to see)
                        It's easy. I've written a shell one-liner for the changes, no big deal and quick. However, I'd like to point out that I still have another issue linked above, that blocks me doing exactly what you're suggesting. That was the first thing I tried, but in my upgraded instance, it doesn't work. Throws an error. It's working has always worked well in all other instances from 4.0 to 5.x. But not on this upgraded one.

                        Comment

                        Working...