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

Please revert ZBXNEXT-7115 where user macro support has been removed from item names

    XMLWordPrintable

Details

    • New Feature Request
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 6.0.0
    • None
    • Frontend (F)
    • None
    • Zabbix 6.0.0

    Description

      Hi Alexei,

      User macros within item names is used within Zabbix supplied templates (such as IIS) for cases where configurable items (i.e. ports, users, file paths etc...) may be included in the item name for information purposes for example:

      • Template (IIS by Zabbix agent)
        • Item Name = IIS: {$IIS.PORT} port ping

       

      • Template ('IIS by Zabbix agent active')
        • Item Name = IIS: {$IIS.PORT} port ping

       

      • Template (Oracle by ODBC)
        • Item Name = Oracle: Sessions locked over {$ORACLE.SESSION.LOCK.MAX.TIME}s
        • Item Name = Oracle: User '{$ORACLE.USER}' expire password

       

      • Template (Oracle by Zabbix agent 2)
        • Item Name = Oracle: Sessions locked over {$ORACLE.SESSION.LOCK.MAX.TIME}s

       

      We use it also in this way mainly for:

      • Port monitoring - using the port number in the name.
        • Macro Name = {$APP.POSTGRES.POSTGRESQL.CONF.PORT:"postmaster"}
        • Macro Value = 5432
        • Item Name = Process - Listening {$APP.POSTGRES.POSTGRESQL.CONF.PORT:"postmaster"}/TCP (postmaster)
        • Item Name Displayed = Process - Listening 5432/TCP (postmaster)

       

      • Logfile monitoring - using the port number in the name.
        • Macro Name = {$OS.SYSTEM_LOGFILE.CONF.PATH:"messages"}
        • Macro Value = /var/log/messages
        • Item Name = System Logfile ({$OS.SYSTEM_LOGFILE.CONF.PATH:"messages"})
        • Item Name Displayed = System Logfile (/var/log/messages)

       

      The concept is that user macros should be used for things that may be configurable like the above where they may be different on each monitored host such as:

      • System log file locations may change per OS
      • Applications / Databases may be configured to listen on different ports.
      • Applications may be configured to run as different users.

      You could just 'hard-code' the item name like 'Process Listening (postmaster)' but this would mean that the support engineer when looking at latest data make assumptions about what port is being checked or look at the actual item key to see what the port number is. This is probably not ideal.

      Regards

      James

      Attachments

        Activity

          People

            vmurzins Valdis Murzins
            james.cook000@gmail.com James Cook
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: