Ad Widget

Collapse

Importing of updated templates fail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • garymol
    Junior Member
    • Mar 2021
    • 7

    #1

    Importing of updated templates fail

    After updating my zabbix installation to 6.0.5, I'm trying to update the templates to the appropriate 6.0 versions, but all of the imports are failing.

    For example, I'm importing "https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/os/linux/template_os_linux.yaml?at=refs%2Fheads%2Frelease%2 F6.0"

    I have all of the "create" and "update" options selected:

    Click image for larger version

Name:	caputure1.jpg
Views:	4345
Size:	38.1 KB
ID:	446722
    when I hit import, I see the diff between the existing and the new, but then I get:

    "Import Failed: Template with host name "Linux by Zabbix agent" already exists."

    Click image for larger version

Name:	caputure2.jpg
Views:	4356
Size:	55.9 KB
ID:	446723

    I see similar results for other templates. For example, importing the updated "PosgreSQL agent 2" template, I get:

    "Import Failed: Item with key "pgsql.cache.hit["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" already exists on "PostgreSQL by Zabbix agent 2".


    Any idea what is going on here? Am I missing something?

    NOTE: This is a an installation that started under release 4 and was subsequently updated to 5.x, and now 6.0.

    Thanks
    Gary
    Attached Files
  • freudi
    Junior Member
    • Mar 2022
    • 7

    #2
    Hey Gary,

    we solved similar problem with no-checking of [Groups]-[Create new].

    Greetings
    freudi

    Comment

    • garymol
      Junior Member
      • Mar 2021
      • 7

      #3
      Thanks Freudi,

      I tried it, but I still get the same error.

      On the diff page, it appears to be matching the change to a "Template OS Linux by Zabbix agent" template, rather than the "Linux by Zabbix agent" template. Having both appears to be a carry over from upgrading from zabbix 4.x to zabbix 5.x when that import did not replace the older template.
      I wonder if its trying to replace the older template "Template OS..." and then failing as "Linux by..." already exists.

      Comment

      • freudi
        Junior Member
        • Mar 2022
        • 7

        #4
        Hey Gary,

        sorry to hear that. Perhaps it's a problem, that is existent but invisible since the update from 4 to 5.
        Our standard-import ist always: all boxes checked, except [Groups]-[Create new]. But once I've got in trouble and I deleted the templates and imported the templates with all boxes checked. Only that helped.

        Greetings freudi

        Comment

        • garymol
          Junior Member
          • Mar 2021
          • 7

          #5
          I wonder if we have to do something more drastic. ie: unlink, purge the templates, re-import, then relink.

          IIRC, relinking should match up the items back to the re-linked templates. Correct?

          Comment

          • freudi
            Junior Member
            • Mar 2022
            • 7

            #6
            Hm, now I think, the quick shot isn't working. Back to the roots:
            I would start at the template error: "Import Failed: Template with host name "Linux by Zabbix agent" already exists."

            First, I would clean the environment.
            - remove all linked templates https://www.zabbix.com/documentation...ing-a-template, perhaps https://www.zabbix.com/documentation...plates/nesting too.
            - remove all host-linked templates at [Configuration] - [Hosts]. There are the red ones. Dont't worry, they will be automatically relinked at next run. Check the related boxes and [Delete].

            Then I need an overview.
            - Make an export of a l l existing templates on the server in which you will import in o n e file. Search with i.e. notepad for "Linux by Zabbix agent" and check if it is convenient.

            Perhaps, that already enough to find the topic.
            Have success (else write again :-))
            freudi

            Comment

            Working...