创建模板监控项原型
POST
http://172.16.14.11:8069/api/v1/hosts/template/3/itemPrototype
接口描述
/api/v1/hosts/template/<int:template_id>/itemPrototype, <int:template_id>:填写模板的id
请求头
参数名
类型
描述
必填
Content-Type
string
application/json
必填
请求参数
参数名
类型
描述
必填
uid
string
用户uid,示例:6
必填
token
string
用户授权码,示例:339f4bf33b017a3aa0bb2d29cfa1bcca18b23ef6o1609904774
必填
name
string
监控项名字,示例:内存使用率(剩%)
必填
history
string
保存时长,示例:90d
必填
key
string
键值,示例:vm.memory.size[pavailable]
必填
delay
string
间隔,示例:30s (s - 秒,m - 分,h -时,d - 天,w - 周)
必填
item_type
string
监控项类型,示例:0 - Zabbix agent; 1 - SNMPv1 agent; 2 - Zabbix trapper; 3 - simple check; 4 - SNMPv2 agent; 5 - Zabbix internal; 6 - SNMPv3 agent; 7 - Zabbix agent (active); 8 - Zabbix aggregate; 9 - web item; 10 - external check; 11 - database monitor; 12 - IPMI agent; 13 - SSH agent; 14 - TELNET agent; 15 - calculated; 16 - JMX agent; 17 - SNMP trap; 18 - Dependent item; 19 - HTTP agent;
必填
value_type
string
数值类型,示例:0 - numeric float; 1 - character; 2 - log; 3 - numeric unsigned; 4 - text.
必填
units
string
单位,示例:%
可选
is_sync
boolean
是否手动更新,示例:false
可选
url
string
URL字符串,仅HTTP agent(item_type: 19)监控项类型需要。支持用户宏,{HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST},{HOST.NAME}, {ITEM.ID}, {ITEM.KEY}。
必填
application_id
int
应用集id
可选