Ad Widget

Collapse

Can't add/clone template (Configuration - Templates)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Minimod
    Junior Member
    • Jun 2022
    • 5

    #1

    Can't add/clone template (Configuration - Templates)

    Please help!
    When I try to add or full clone template, I see error:
    Cannot add template:
    Invalid parameter "/1/host": invalid host name.

    What is it?
    How can I fix it?
  • vladimir_lv
    Senior Member
    • May 2022
    • 240

    #2
    Providing the Zabbix version increases the chances of getting a correct answer. As far as a template name.

    Comment

    • Minimod
      Junior Member
      • Jun 2022
      • 5

      #3
      Originally posted by vladimir_lv
      Providing the Zabbix version increases the chances of getting a correct answer. As far as a template name.
      Thank you
      It was really template name

      Comment

      • vgervais
        Junior Member
        • Nov 2022
        • 3

        #4
        Hi. I am having the same issue after trying to import an xml file. My running Zabbix is 6.2.4 in docker. The xml file was generated using SNMPWALK2ZABBIX script from https://github.com/Sean-Bradley/SNMPWALK2ZABBIX

        Can anyone give me some idea whats wrong with the template? Would I need to share it?

        Comment

        • vgervais
          Junior Member
          • Nov 2022
          • 3

          #5
          Bump. My Zabbix server version is 6.2.4 and it is running in Docker

          Comment

          • vgervais
            Junior Member
            • Nov 2022
            • 3

            #6
            I think I fixed it, trying to get info from the vague answers on this thread. The way I did it was to amend the <template></template> just above the <name></name> portion of the .xml file.
            Eg. The .xml file generated from the above app, had the quotation marks in the template like this: <template>"some_name_here" SNMP</template>
            I just removed the quotation marks "" and SNMP to leave <template>some_name_here</template>
            Hope this helps if anyone else comes by, or if needs further input.

            Comment

            • biapy
              Junior Member
              • Nov 2023
              • 1

              #7
              Hello,

              The error
              Code:
              Invalid parameter "/1/host": invalid host name.
              is due to invalid characters in template name. Remove special characters (such as ( and )) and use the visible name field to use a name with special characters.

              The error should really be "Invalid template name".

              Comment

              • nameuser
                Member
                • Apr 2018
                • 39

                #8
                Sometimes I wonder how this even gets released. If the issue lies in the template name, then the error should clearly state that. Instead, when I mistakenly named the template, I received an 'Invalid parameter "/1/host": invalid hostname' error. What does the host or hostname have to do with it? It's baffling.
                2023, by the way.

                Comment

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

                  #9
                  I do agree that template errors should say things about template not host... but a random fact for you ... Templates and hosts live in same DB table.. Template is basically a host, just has different type... So that is probably the origin of the issue...

                  Comment

                  Working...