Ad Widget

Collapse

Nested Macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abdulshafy
    Junior Member
    • Aug 2010
    • 13

    #1

    Nested Macros

    Hello all,
    What I need to do is to define some macro in a template in terms of another macro which is defined inside the hosts linked to that template.

    Ex.
    In template:
    {$LANIF} ⇒ 10.{$BN}.1.1
    In a host linked to the template:
    {$BN} ⇒ 55
    I'm not able to do that! and the only thing that works is to define macros to resolve to a static value.
    Any help will be much appreciated.
  • abdulshafy
    Junior Member
    • Aug 2010
    • 13

    #2
    Still looking for an answer!

    Comment

    • asaveljevs
      Zabbix developer
      • Feb 2010
      • 36

      #3
      This question has recently been brought up internally and we have decided that recursive user macros like the ones you mentioned will not be supported.

      Comment

      • abdulshafy
        Junior Member
        • Aug 2010
        • 13

        #4
        Oh it would be very useful! as it would, dramatically, facilitate configuration!, is there any workaround?

        Comment

        • asaveljevs
          Zabbix developer
          • Feb 2010
          • 36

          #5
          Unfortunately, there does not seem to be. One of the reasons why we have decided against is that recursive user macros might slow the frontend significantly.

          Comment

          • abdulshafy
            Junior Member
            • Aug 2010
            • 13

            #6
            A better trade-off would be limiting the depth of recursion levels, may be to 1, thus avoiding significant performance degradation.

            Comment

            • Vaku
              Junior Member
              • Feb 2018
              • 24

              #7
              Originally posted by asaveljevs
              This question has recently been brought up internally and we have decided that recursive user macros like the ones you mentioned will not be supported.
              But why?
              Grafana supports nested macros. Why you decided to not support this? This just cuts down all the flexibility this functionality could provide.

              Comment

              Working...