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

Enhancement - Third type of macro (dev suggestion)

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • Frontend (F)
    • None

      Actually, Zabbix have two types of macros: {$MACRO} (user-defined macro) and {#MACRO} (LLD Macro).

      My suggestion would be creating a third type (for example {%MACRO}) for what would be a "macro" (behave like a macro), but in fact would be a reference for the data obtained by some item of some host. It could be only the latest collected data of the item, but to make it feature-rich, functions like average, count and others could be considered.

      So, I would need to have a way to "attach" (reference) this macro to a certain collected item data, in the same way I put a text value on an user macro.

      With this macro, my goal would be: if I obtain certain item data and want to embed it on a script or discovery rule, I can do it. 

      If I want to interact with a web API informing collected data in order to obtain a certain result, I can obtain this item data (for example, from an internal server) and put it into this suggested macro so I can build a script to send to some external API and monitor the result. For example, I can collect data from a sensor, and insert it into a script call for a webservice using this macro, and according to the result returned from this webservice, I can trigger an alarm or not.

      Another use would be to make discovery rules when certain obtained parameters must be informed on that rule, I faced a similar case that need to solve using a Perl script, but if this macro existed, this script could be avoided.

      This suggestion would bring more power and flexibility to Zabbix platform, reducing the need to rely on external scripts, and would increase the third-party Zabbix integration possibilities.

            vmurzins Valdis Murzins
            adritrindade Adriano Trindade
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: