Ad Widget


Zabbix JSON API output parameter

  • Filter
  • Time
  • Show
Clear All
new posts

    Zabbix JSON API output parameter

    From zabbix API documentation:

    Get methods output parameter

    Output can be “shorten”, “refer”, “extend” and array of db field names.

    -shorten: only ids of elements are returned. (for hosts it's hostid, for items itemid etc)
    -refer: element ids are returned with element ids that were used in query.
    For example request item.get(output: refer, hostids: [1,2,3])) will return items with itemids and hostids.
    -extend: all db fields of element are returned (select *)
    -array of db fields: listed db fields are returned

    What is the correct format to pass an array of db fields? I have tried the following:

    but this only returns the itemids

    or is there a different way to filter the returned fields?
    Last edited by akushner; 08-02-2012, 00:04.

    Not supported for items

    After doing a little more digging, I found an update that states the following


    “output”:“extend” means that you want to get all available info about each group. This, in a way, is similar to “SELECT *” in SQL. Possible options of “output” are:

    “extend” - get all info;
    “shorten” - get only ids of an object;
    “refer” - get id of an object and also ids of related objects;
    list of fields, like [“groupid”, “name”] - get only listed fields.

    List of fields is only supported in Alert, DCheck, Host, DService, Screenitem, Template and Trigger get methods.



    No announcement yet.