此方法用于根据给定参数来获取图表监控项。
参数
(对象)
定义所需输出的参数。
(整数/数组)
返回:
一个数组对象;
示例
从图表中获取图表监控项
获取图表中使用的所有图表监控项以及有关监控项和主机的其他信息。
请求:
{
"jsonrpc": "2.0",
"result": [
{
"gitemid": "1242",
"graphid": "387",
"itemid": "22665",
"drawtype": "1",
"sortorder": "1",
"color": "FF5555",
"calc_fnc": "2",
"type": "0",
"hostid": "10001",
"flags": "0",
"host": "Template OS Linux"
},
{
"gitemid": "1243",
"graphid": "387",
"itemid": "22668",
"drawtype": "1",
"sortorder": "2",
"color": "55FF55",
"yaxisside": "0",
"calc_fnc": "2",
"type": "0",
"key_": "system.cpu.util[,softirq]",
"hostid": "10001",
"host": "Template OS Linux"
{
"gitemid": "1244",
"graphid": "387",
"itemid": "22671",
"drawtype": "1",
"sortorder": "3",
"color": "009999",
"yaxisside": "0",
"calc_fnc": "2",
"type": "0",
"key_": "system.cpu.util[,interrupt]",
"hostid": "10001",
"flags": "0",
"host": "Template OS Linux"
}
],
"id": 1
来源
CGraphItem::get() in frontends/php/include/classes/api/services/CGraphItem.php.