Ad Widget

Collapse

Variable $1 on table Items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brenoacp
    Junior Member
    • Jun 2016
    • 26

    #1

    Variable $1 on table Items

    Hello everyone!
    I am performing a query in the Items table, and the name of some items is displayed for example:

    "Outgoing network traffic on $1"
    or
    "Free disk space on $1".

    Where is the value of these variables stored?
    Please, could you help me?

    Best regards,
    Breno Padovan
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    This is positional macro.
    Use power of documentation https://www.zabbix.com/documentation...fig/items/item
    Name Item name.
    Note that the use of positional macros ($1,$2… $9 - referring to the first, second… ninth parameter of the item key) is now deprecated.
    For example: Free disk space on $1. If the item key is "vfs.fs.size[/,free]", the description will automatically change to "Free disk space on /"

    Comment

    • isaqueprofeta
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Aug 2020
      • 154

      #3
      That's an old version of Zabbix that you have...

      In database you're going a long and painful set of joins, you need to get the id on the LLD of this item, look at the LLD macro that it's referencing, and then get the macro.

      Instead, try to use the API, there's an option in item.get called something like "expand macros" (If you want to do reverse engineering for database queries you can look for this method in the source code of your version).

      Comment

      • brenoacp
        Junior Member
        • Jun 2016
        • 26

        #4
        Perfect gentlemen!
        I will follow with the api.

        Thanks for the answers.

        Breno Padovan



        Comment

        Working...