Ad Widget

Collapse

Data Overview showing variable instead of values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • y4nn1ck
    Junior Member
    • Aug 2020
    • 22

    #1

    Data Overview showing variable instead of values

    Hello everyone, i've just upgraded Zabbix to 5.0.2, from 4.0 it's been working alright but i'm running into an issue.

    In my own dashboard, in a current or new Widget, i don't see the actual values, but i see the variable "ie : $2"

    Click image for larger version

Name:	ZabbixVariables.png
Views:	812
Size:	17.3 KB
ID:	406582

    Has anyone encountered such an issue?

    Thanks!

    - Yannick
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Use full macro name instead of $1, $2.

    Comment

    • y4nn1ck
      Junior Member
      • Aug 2020
      • 22

      #3
      Sorry i dont think i was clear enough...This is a built in widget from the Zabbix frontend, nothing i built myself... maybe i need to post this on the bug thread though

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #4
        Replace the positional macros in the template you are using with the corresponding full-name macros.
        https://www.zabbix.com/documentation...fig/items/item

        Note that the use of positional macros ($1,$2… $9 - referring to the first, second… ninth parameter of the item key) is now deprecated

        Comment

        • y4nn1ck
          Junior Member
          • Aug 2020
          • 22

          #5
          I understand what you are suggesting but as i said before, it's not an item i made myself, it's a widget for the Dashboard made by Zabbix...not sure how i can modify that.

          I found the error!!!! In the database, the item created for that Data Overview of the Zabbix server has been wrote with the $4 and $2 value :

          mysql> select * from items where itemid=23328 \G
          *************************** 1. row ***************************
          itemid: 23328
          type: 5
          snmp_oid:
          hostid: 10084
          name: Zabbix $4 $2 processes, in %
          key_: zabbix[process,vmware collector,avg,busy]

          So basically what i did was to update the template used for Zabbix : Template_App_Zabbix_Server-4.2.0.xml from thee official webpage : https://www.zabbix.org/wiki/Zabbix_T...cial_Templates

          All is good now!

          Comment

          • eithor
            Member
            • May 2020
            • 50

            #6
            Note that after upgrade from 4.x to 5.x you should do a manual import of all provided templates (from source/git) as this is not done automatically.

            Comment

            • y4nn1ck
              Junior Member
              • Aug 2020
              • 22

              #7
              That's very good to know...and i hope Zabbix improve this as far as official template goes.

              Comment

              • y4nn1ck
                Junior Member
                • Aug 2020
                • 22

                #8
                Good point

                Comment

                Working...