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

Be able to use host built-in macros on user macros with context

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Server (S)

      Currently, when need to setup a custom threshold we can use context macros on host or template level.

      There are cases where we need to have threshold per hostgroup (ex. we have a specific hostgroup called UAT servers for which the cpu/mem/disk thresholds must be really higher than the prod ones. Naming convention is also used and we can understand from naming these servers belong to the uat hostgroup).

      With the current approach, in order to maintain a logic for the above we need to do something like below:

      • duplicate the templates and use specific templates for the systems that must have the different thresholds (cons: a lot of administrative effort, every time a template is updated, a lot of work needs to be done to maintain all templates)
      • use user macros on the hosts that belong to the mentioned hostgroup (cons: a lot of administrative effort and prone to configuration mistakes)

       

      If we were able to modify the triggers on one template and use an expression with a  host built-in macro like the below example:

       

      min(//cpu.utilization,3m)>{$CPU.UTIL.CRIT.THRESHOLD:"

      {HOST.NAME}

      "}

       

      then, we can maintain user macros on the template level to do the categorization based on the naming convention of the servers.

      ex:

      {$CPU.UTIL.CRIT.THRESHOLD} => 90% "Default threshold"

      {$CPU.UTIL.CRIT.THRESHOLD:regex:"^.(uat|dev).$"} => 98% "Threshold for servers whose name contains uat or dev"

       

      I think the above functionality is widely requested and needs to be implemented, in order to be able and have simpler configurations without raising the administrative effort and complexity in the platform.

            wiper Andris Zeila
            christos.diamantis Christos Diamantis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: