Ad Widget

Collapse

How to troubleshoot template import failure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whitetr6
    Junior Member
    • Apr 2011
    • 12

    #1

    How to troubleshoot template import failure

    I have a template provided by another party but I don't know whether it may have been designed for an earlier version of Zabbix or whether there is some other problem. I'm using version 2.20. When I try to import it, I receive the following error:

    Incorrect key: "Invalid item key format.".

    I don't know how to figure out which item is the problem. How do I troubleshoot a template import?

    Thanks!
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    Attach the template here and I will see if I can help you figure out the issue.

    Comment

    • whitetr6
      Junior Member
      • Apr 2011
      • 12

      #3
      Well, I thought I could do that. Unfortunately when I try to post the second half, the forum is telling me:

      Too many live links/images found in your post content. Please edit your post or contact the administrator.

      Is there a way around that? I wrapped the content in the code tags so I'm not sure why it's happening.

      Thanks

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        You couldn't just simply attach it to the message as either an xml or zip attachment?

        Comment

        • whitetr6
          Junior Member
          • Apr 2011
          • 12

          #5
          Oh sorry about that, I didn't realize that was an option. Here it is. Thanks again for being willing to take a look.
          Attached Files

          Comment

          • tchjts1
            Senior Member
            • May 2008
            • 1605

            #6
            Here you go. Should work now. It was choking on one item and one trigger. I removed them. If you can live without the "SSH service is responding" item and associated trigger, then you are good to go. Attached as smartos_zones_2.xml

            As an FYI, here is the item and trigger I removed:

            Code:
            <item type="3" key="tcp,22" value_type="3">
                      <description>SSH Service is Responding</description>
                      <ipmi_sensor></ipmi_sensor>
                      <delay>60</delay>
                      <history>3</history>
                      <trends>365</trends>
                      <status>0</status>
                      <data_type>0</data_type>
                      <units></units>
                      <multiplier>0</multiplier>
                      <delta>0</delta>
                      <formula>1</formula>
                      <lastlogsize>0</lastlogsize>
                      <logtimefmt></logtimefmt>
                      <delay_flex></delay_flex>
                      <authtype>0</authtype>
                      <username></username>
                      <password></password>
                      <publickey></publickey>
                      <privatekey></privatekey>
                      <params></params>
                      <trapper_hosts></trapper_hosts>
                      <snmp_community></snmp_community>
                      <snmp_oid></snmp_oid>
                      <snmp_port>161</snmp_port>
                      <snmpv3_securityname></snmpv3_securityname>
                      <snmpv3_securitylevel>0</snmpv3_securitylevel>
                      <snmpv3_authpassphrase></snmpv3_authpassphrase>
                      <snmpv3_privpassphrase></snmpv3_privpassphrase>
                      <valuemapid>0</valuemapid>
                      <applications>
                        <application>Availability</application>
                      </applications>
                    </item>
            		
            		<trigger>
                      <description>SSH server is down on {HOSTNAME}</description>
                      <type>0</type>
                      <expression>{Joyent_Solaris_Zones:tcp,22.sum(#3)}=0</expression>
                      <url></url>
                      <status>1</status>
                      <priority>4</priority>
                      <comments></comments>
                    </trigger>
            Attached Files

            Comment

            • whitetr6
              Junior Member
              • Apr 2011
              • 12

              #7
              Thanks very much for your help.

              For my learning...how were you able to find it was those sections causing the problem? Is there a log entry somewhere?

              Thanks again

              Comment

              • tchjts1
                Senior Member
                • May 2008
                • 1605

                #8
                You are welcome for the help. I imported it into my 2.0.9 setup. Any time there are errors, they will show on the "details" section of the import page. Just scroll down until you find the error. Should be this way in 2.2.0 as well.

                The entries are sequential, so we know that whatever is in the template after "Number of users connected..." is the one that is causing (at least) the first error. Checking in the template, it was that SSH check that was next. Remove that from the template and try another import. Then the trigger for that SSH check failed. Remove that and try another import. Success.

                That item and key could probably be adjusted to work. I personally don't know what the issue with it is just by looking at it. I would have to compare it to a similar key and see what's up. Don't have time for that right now though.
                Attached Files

                Comment

                • whitetr6
                  Junior Member
                  • Apr 2011
                  • 12

                  #9
                  Perfect I understand completely. Thanks again

                  Comment

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #10
                    Welcome. You got lucky and it was just one item causing the issue.

                    The headache comes if you get a template with 30 items - and all of the keys are out of whack for some reason or another.

                    Comment

                    Working...