Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-4744

Allow to use item values as item keys by saving values to {$MACROS} (for example, in preprocessing)

    XMLWordPrintable

    Details

    • Type: New Feature Request
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0.0rc1
    • Fix Version/s: None
    • Component/s: Frontend (F), Server (S)
    • Labels:
      None

      Description

      There are many scenarios that would highly benefit from being able to use the one item value as the item key for a different item.

      The change is trivial, but will allow MUCH greater flexibility in using Zabbix and will allow to get rid of quite a few external scripts.

      Please see the attached screenshot for what I'd like to see (a preprocessing step).

      Let me provide a scenario.

      Zabbix 4.0 introduced HTTP Agent checks. The only problem with HTTP Agent checks is that you cannot use the result of one check in another check. While it was possible with "variables" in "Web monitoring", web monitoring did not allow you to save the result of the check.

      Here's a real-life scenario:

      A lot of APIs (we are trying to use Azure/AD) would only provide you with responses after you make a request with an authentication token.
      To get an authentication token, another request must precede, and the token has a lifetime (e.g it expires after N hours etc).

      If Zabbix allows saving an item value to a {$USERMACRO}, the following would be possible.
      1) an infrequent HTTP item (once a week) gets the authentication token and saves it to a host {$USERMACRO}, ensuring the {$USERMACRO} always has an up-to-date token (otherwise it expires)
      2) another HTTP item uses the {$USERMACRO} to connect to third party API (Azure/AD) and get the JSON with all the data at once
      3) dependent items on item in step 2) populate all the required information to relevant fields

      As a result, this would allow for a much more flexible monitoring.
      Currently, it is only possible with "curl" external scripts (but Zabbix can do a lot of it by itself, including preprocessing and json parsing, all that's needed is to save an item value to a {$USERMACRO}

      This is possible a duplicate of ZBXNEXT-4449, but the use-case/scenario is different. Also, I'm providing a PNG file of where, in my opinion, it would "fit".

        Attachments

          Activity

            People

            Assignee:
            vmurzins Valdis Murzins
            Reporter:
            ilyakruchinin Ilya Kruchinin
            Votes:
            21 Vote for this issue
            Watchers:
            17 Start watching this issue

              Dates

              Created:
              Updated: