描述

    The method allows to retrieve graph items according to the given parameters. 此方法用于根据给定参数来获取图表监控项。

    Parameters

    参数

    (object) Parameters defining the desired output. (对象) 定义所需输出的参数。

    The method supports the following parameters. 此方法支持以下参数:

    参数类型描述
    gitemidsstring/array仅返回给定ID的图表监控项
    graphidsstring/array仅返回属于给定图表的图表监控项
    itemidsstring/array仅返回具有给定监控项ID的图表监控项
    typeinteger仅返回给定类型的图表监控项

    有关支持的图表监控项的类型,请参考.
    selectGraphsquerygraphs(图表)属性下,以数组的形式返回监控项所属的图表
    sortfieldstring/array根据给定属性对结果进行排序.

    可能值: gitemid.
    countOutputboolean以下参数为get方法通常参数,在参考注释有详细说明.
    editableboolean
    limitinteger
    outputquery
    preservekeysboolean
    sortorderstring/array

    返回值

    (integer/array) Returns either:

    • the count of retrieved objects, if the countOutput parameter has been used.

    (整数/数组) 返回:

    • 一个数组对象;

    • 如果使用了 countOutput 参数,返回获取的对象的数量.

    Examples

    例子

    Retrieving graph items from a graph

    从图表中获取图表监控项

    Request: 请求:

    Response: 响应:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "gitemid": "1242",
    6. "itemid": "22665",
    7. "drawtype": "1",
    8. "color": "FF5555",
    9. "yaxisside": "0",
    10. "calc_fnc": "2",
    11. "type": "0",
    12. "key_": "system.cpu.util[,steal]",
    13. "hostid": "10001",
    14. "flags": "0",
    15. "host": "Template OS Linux"
    16. },
    17. {
    18. "gitemid": "1243",
    19. "graphid": "387",
    20. "itemid": "22668",
    21. "drawtype": "1",
    22. "sortorder": "2",
    23. "color": "55FF55",
    24. "yaxisside": "0",
    25. "calc_fnc": "2",
    26. "type": "0",
    27. "key_": "system.cpu.util[,softirq]",
    28. "flags": "0",
    29. "host": "Template OS Linux"
    30. },
    31. {
    32. "gitemid": "1244",
    33. "graphid": "387",
    34. "itemid": "22671",
    35. "drawtype": "1",
    36. "sortorder": "3",
    37. "color": "009999",
    38. "yaxisside": "0",
    39. "calc_fnc": "2",
    40. "type": "0",
    41. "key_": "system.cpu.util[,interrupt]",
    42. "hostid": "10001",
    43. "flags": "0",
    44. "host": "Template OS Linux"
    45. }
    46. ],
    47. "id": 1

    参考

    Source

    来源