Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-4480

Discovery from custom CSV string

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Workaround proposed
    • Icon: Trivial Trivial
    • None
    • 4.0 (plan)
    • Agent (G), Server (S)

      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"}]}

            MVekslers Michael Veksler
            rajniak@egroup.sk Roman Rajniak
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: