-
New Feature Request
-
Resolution: Unresolved
-
Trivial
-
None
-
4.4.8
Hi,
Could you please make the built-in macros available for use in preprocessing steps ?
For example, it would be nice to use {HOST.HOST} in regular expression preprocessing,
but it would be nice if I could use it also in JavaScript preprocessing calling
a method of a class ZabbixMacro like the following:
var hostname = ZabbixMacro.get("{HOST.HOST}");
One use case where I encountered this limitation is the following:
I'd like to use Javascript preprocessing to do some GET requests to an API.
This API has the same domain name as the hostname configured on Zabbix,
so I'd like to be able to do a CurlHttpRequest.Get() to it using the value
of the {HOST.HOST} macro.
I'm aware that this macro can be used in the URL field of the HTTP Agent check Item, but going through this path will force me to create a ton of other items in order to achieve my goal, it would be definitely cleaner to throw everything inside a Javascript preprocessing step.
- is duplicated by
-
ZBXNEXT-5815 Get macro value from JS code of webhook
- Closed