Ad Widget

Collapse

6.4.0, template import failed, Invalid parameter "/2/trends"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bega
    Junior Member
    • Oct 2022
    • 6

    #1

    6.4.0, template import failed, Invalid parameter "/2/trends"

    Hi can someone help with template import. Zabbix 6.4.0. I have created template from .mib with mib2zabbix. Exported to .xml. When importing template i have error:
    • Invalid parameter "/2/trends": value must be 0.
    Click image for larger version  Name:	Screenshot 2023-04-18 111019.jpg Views:	0 Size:	42.3 KB ID:	463162
    Click image for larger version  Name:	Screenshot 2023-04-18 111601.jpg Views:	0 Size:	228.4 KB ID:	463163

    Temperature-sensor-Comet-T0510.xml

    Thanks!
    Last edited by Bega; 18-04-2023, 10:18.
  • Glencoe
    Zabbix developer
    • Oct 2019
    • 152

    #2
    Don't use mib2zabbix. It generates templates in 3.0 format and sets trends field incorrectly. 3.0 was more forgiving and ignored trends set for non-numeric types whereas modern Zabbix versions are more strict about this.

    Comment

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

      #3
      Originally posted by Glencoe
      Don't use mib2zabbix. It generates templates in 3.0 format and sets trends field incorrectly. 3.0 was more forgiving and ignored trends set for non-numeric types whereas modern Zabbix versions are more strict about this.
      Very good observation..
      So, if you really want to use that mib2zabbix, then go over the result and where ever you find "<value_type>4</value_type>", look couple of lines above it and change "<trends>365</trends>" to "<trends>0</trends>", I guess you need to do it for any "value type" that is not 0 (float) or 3 (integer).
      It may be easier to change it globally in file and IF you get it imported, then do mass update on float and integer items and set it back to some reasonable number.

      Next thing, what you maybe stumble on, is the "<type>4</type>" which in v3 format means "SNMPv2 agent", but that value 4 is not present in v6+ any more... It may overcome this somehow, but you may need to change it to "<type>20</type>", which is just "SNMP agent"...

      Comment

      • Bega
        Junior Member
        • Oct 2022
        • 6

        #4
        Thanks for answers i will check. Zabbix 6.4.0 on Ubuntu, so what is the best way to convert .mib to .xml or yaml ?

        Comment

        • rabin
          Junior Member
          • Nov 2020
          • 10

          #5
          I have the same issue when I tried to use mib2zabbix, and even when I replaced all trends of type 4 into 0, I was hit by another issue,

          Code:
          Invalid parameter "/101/valuemapid": value must be 0.


          What my options to create a template from MIB if the script above is not maintained anymore?

          Comment


          • svilches
            svilches commented
            Editing a comment
            The same thing happens to me, were you able to solve it? Thanks in advance

          • Andrey.A
            Andrey.A commented
            Editing a comment
            I have the same situation. Did you manage to find a solution ?
        • markosa
          Senior Member
          Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
          • Aug 2022
          • 104

          #6
          I've been using mib2zabbix with 6.0.19 without any problems, I noticed that there was notification message "Smartmatch is experimental..." at Bega screenshot , I can't find such string from version I'm using. Perhaps version used is somehow broken one? Here's version I'm using:​ mib2zabbix.zip
          Attached Files

          Comment

          • rabin
            Junior Member
            • Nov 2020
            • 10

            #7
            Thx markosa, but I have the same file, And I try to create a template to monitor a Lenovo XClarity Controller, from the files Lenovo XClarity Controller.zip and i'm unable to produce a working template.




            Attached Files

            Comment

            • markosa
              Senior Member
              Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
              • Aug 2022
              • 104

              #8
              rabin using MIB's you provided I was able to create template for lenovo (mib2zabbix.pl -o .1.3.6.1.4.1.19046 -f ./lenovo.xml ). I tried to attach those, one created with mib2zabbix and one exported from zabbix 6.0.19, but this complains about size, eventhoug those are small files.
              Attached Files
              Last edited by markosa; 28-07-2023, 07:44. Reason: Upload succeded with separate zip-files.

              Comment

              • vijayk
                Senior Member
                • May 2023
                • 305

                #9
                Server Lenovo XCC.zip Try this. I'm using it in v6.4.4 and working fine.

                Comment

                • rabin
                  Junior Member
                  • Nov 2020
                  • 10

                  #10
                  Originally posted by rabin
                  Thx markosa, but I have the same file, And I try to create a template to monitor a Lenovo XClarity Controller, from the files Lenovo XClarity Controller.zip and i'm unable to produce a working template.​
                  But did you able to import the file?

                  Comment

                  • rabin
                    Junior Member
                    • Nov 2020
                    • 10

                    #11
                    Originally posted by vijayk
                    [ATTACH]n467897[/ATTACH] Try this. I'm using it in v6.4.4 and working fine.
                    On import I get this message,
                    Code:
                    Import failed[LIST][*]Incorrect trigger expression. Host "Template Server Lenovo XCC SNMPv3" does not exist or you have no access to this host.[/LIST]
                    ​

                    Comment

                    • vijayk
                      Senior Member
                      • May 2023
                      • 305

                      #12
                      Originally posted by rabin

                      On import I get this message,
                      Code:
                      Import failed[LIST][*]Incorrect trigger expression. Host "Template Server Lenovo XCC SNMPv3" does not exist or you have no access to this host.[/LIST]
                      ​
                      Server Lenovo XCC (2).zip Try with this one.

                      Comment

                      • rabin
                        Junior Member
                        • Nov 2020
                        • 10

                        #13
                        Thx vijayk , the import was successful. But I yet setup SNMP on the hosts to monitor them.

                        Comment

                        • vijayk
                          Senior Member
                          • May 2023
                          • 305

                          #14
                          Originally posted by rabin
                          Thx vijayk , the import was successful. But I yet setup SNMP on the hosts to monitor them.
                          Welcome robin.

                          Comment

                          • markosa
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                            • Aug 2022
                            • 104

                            #15
                            rabin as I said "one created with mib2zabbix and one exported from zabbix 6.0.19", so yes, I was able to import that file.

                            Comment

                            Working...