Ad Widget

Collapse

Macros in keys ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • attila
    Junior Member
    • May 2006
    • 8

    #1

    Macros in keys ?

    It seems to me that macros don't get taken into account in keys. Is there a way to relay f.e. HOSTNAME to the agent ? I thought this might be useful is some situations, for example if there are several hosts/sites/etc on the same IP. You could ask the agent for something like a vserver.processes[{HOSTNAME}] userparam which would parse the appropriate entries. This way you could have a vserver template instead of creating separate entries for all the entries on all the hosts. Or have I gotten an idea for something that can already be done otherwise ?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for the idea! We will consider implementing this in the future.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • attila
      Junior Member
      • May 2006
      • 8

      #3
      What's the officail timeline on this (1.2) ? I got impatient and hacked together a version that does this for me for the current beta Not sure if I did it the right way, if you think what I did below makes sense, and you are interested in the patch, please reply

      - added a function to zabbix-server/expression.c (I was unable to use the existing sbstitute_macros since at the polling I don't see the trigger required for the existing func)
      - changed a line in zabbix-server/poller/checks_agent
      - changed a regex in the php frontend as it did not allow for expressions that contained {} chars in the key name

      Comment

      Working...