Ad Widget

Collapse

Zabbix version 6 LTS after upgrade some variables are not replaced

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BalaC
    Junior Member
    • Sep 2021
    • 22

    #1

    Zabbix version 6 LTS after upgrade some variables are not replaced

    After upgrade to Zabbix 6 LTS, It seems that some variables are not filled anymore since the update.
    and e.g. here for CPU load and network traffic screen - "$2" should actually be the CPU ID/number and "$1" should actually be the interface name.
    If we import the new template for OS then will loose old data. Anyone faced similar issue?


    Click image for larger version

Name:	image.png
Views:	1089
Size:	26.2 KB
ID:	451884
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    The $1, $2 macros were deprecated, it was announced (I think) in the 4.x to 5.0 conversion but not enforced until 6.0. I think this is an old template shipped by Zabbix, you'll either need to update these items or replace the template with the newer one. I have a python API script that will find them all I can share if you want it.

    If you fix the item names in the current templates, you won't lose the old data. The edit is trivial, the value referred to is the positional key value. In LLD items, it may be a macro, just copy what is there replacing the $1 in the name.

    I put the script on github https://github.com/rugenl/zabbix-api...macro_items.py
    Last edited by LenR; 26-09-2022, 19:28.

    Comment


    • tim.mooney
      tim.mooney commented
      Editing a comment
      Thanks for sharing your script!
  • BalaC
    Junior Member
    • Sep 2021
    • 22

    #3
    Thanks a lot for the reply and the script. I will check it further.

    Comment

    • BalaC
      Junior Member
      • Sep 2021
      • 22

      #4
      Hi, By using the script we can see 860 items to fix manually. Do you have a clue about what should replace the $*. We got the entire list from the script you given but what exactly we need to replace please.​

      Thanks.

      Comment

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

        #5
        Probably appropriate LLD macro from discovery.

        Comment

        Working...