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 ?
Ad Widget
Collapse
Macros in keys ?
Collapse
X
-
Thanks for the idea! We will consider implementing this in the future. -
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 nameComment
Comment