-
Change Request
-
Resolution: Workaround proposed
-
Trivial
-
None
-
4.0 (plan)
To create a set of predefined items using #MACRONAME we can use "Discovery rule" which calls external script.
But if set of values would be provided in CSV format, we do not need create dummy script in external scripts which returns constant JSON string.
For instance, in the discovery rule add new Type in list like "Custom"
or to Zabbix agent something like CSV2JSON[<macroname>,<string value list>]
Example of configured Discovery rule:
Key: csv2json[MACRONAME1,"TEST,PROD,DEVEL"]
Output like:
{"data":[{"{#MACRONAME1}":"TEST"},{"{#MACRONAME1}":"PROD"},{"{#MACRONAME1}":"DEVEL"}]}