获取

    该方法允许根据给定的参数来检索图表监控项。

    这种方法对任何类型的用户都适用。调用该方法的权限可以在用户角色设置中撤销。前往用户角色以获取更多信息。

    参数

    该方法支持以下参数。

    返回值是 (integer/array) 其中之一:

    • 一个对象的数组;
    • 如果使用了countOutput参数,则为检索到的对象的数量。

    示例

    从图表中检索图表监控项

    请求:

    响应:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "gitemid": "1242",
    6. "graphid": "387",
    7. "itemid": "22665",
    8. "drawtype": "1",
    9. "sortorder": "1",
    10. "color": "FF5555",
    11. "calc_fnc": "2",
    12. "type": "0",
    13. "hostid": "10001",
    14. "flags": "0",
    15. "host": "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. "hostid": "10001",
    29. },
    30. {
    31. "gitemid": "1244",
    32. "graphid": "387",
    33. "itemid": "22671",
    34. "drawtype": "1",
    35. "sortorder": "3",
    36. "color": "009999",
    37. "yaxisside": "0",
    38. "calc_fnc": "2",
    39. "type": "0",
    40. "key_": "system.cpu.util[,interrupt]",
    41. "hostid": "10001",
    42. "flags": "0",
    43. "host": "Linux"
    44. }
    45. ],

    来源