主机对象

以下对象于主机API直接相关。

主机

主机对象具有以下属性。

Property Type Description
hostid ID 主机的 ID。

Property behavior:
- read-only
- required for update operations
host string 主机的技术名称。

Property behavior:
- required for create operations
description text 主机的描述。
flags integer 主机的来源。

Possible values:
0 - a plain host;
4 - a discovered host.

Property behavior:
- read-only
inventory_mode integer 主机清单填充模式。

Possible values:
-1 - (default) disabled;
0 - manual;
1 - automatic.
ipmi_authtype integer IPMI 认证算法。

Possible values:
-1 - (default) default;
0 - none;
1 - MD2;
2 - MD5
4 - straight;
5 - OEM;
6 - RMCP+.
ipmi_password string IPMI 密码。
ipmi_privilege integer IPMI 权限级别。

Possible values:
1 - callback;
2 - (default) user;
3 - operator;
4 - admin;
5 - OEM.
ipmi_username string IPMI 用户名。
maintenance_from timestamp 生效维护的开始时间。

Property behavior:
- read-only
maintenance_status integer 生效维护状态。

Possible values:
0 - (default) no maintenance;
1 - maintenance in effect.

Property behavior:
- read-only
maintenance_type integer 生效维护类型。

Possible values:
0 - (default) maintenance with data collection;
1 - maintenance without data collection.

Property behavior:
- read-only
maintenanceid ID 当前对主机生效的维护的 ID。

Property behavior:
- read-only
name string 主机的可见名称。

Default: host property value.
monitored_by integer 用于监控主机的来源。

Possible values:
0 - (default) Zabbix 服务器;
1 - Proxy;
2 - Proxy group.
proxyid ID 用于监控主机的 proxy 的 ID。

Property behavior:
- required if monitored_by is set to "Proxy"
proxy_groupid ID 用于监控主机的 proxy 组的 ID。

Property behavior:
- required if monitored_by is set to "Proxy group"
status integer 主机的状态和功能。

Possible values:
0 - (default) enabled;
1 - disabled.
tls_connect integer 到主机的连接。

Possible values:
1 - (default) No encryption;
2 - PSK;
4 - certificate.
tls_accept integer 来自主机的连接。

Possible bitmap values:
1 - (default) No encryption;
2 - PSK;
4 - certificate.

This is a bitmask field; any sum of possible bitmap values is acceptable (for example, 6 for PSK and certificate).
tls_issuer string 证书颁发者。
tls_subject string 证书主题。
tls_psk_identity string PSK 标识;必须且只能与一个 PSK 配对(跨 autoregistrationhostsproxies)。

请勿在 PSK 标识中包含敏感信息,因为它会以未加密方式在网络中传输,以告知接收方应使用哪个 PSK。

Property behavior:
- write-only
- required if tls_connect is set to "PSK", or tls_accept contains the "PSK" bit
tls_psk string 预共享密钥(PSK);必须至少包含 32 个十六进制数字。

Property behavior:
- write-only
- required if tls_connect is set to "PSK", or tls_accept contains the "PSK" bit
active_available integer 主机主动接口可用性状态。

Possible values:
0 - interface status is unknown;
1 - interface is available;
2 - interface is not available.

Property behavior:
- read-only
assigned_proxyid ID 如果主机由 proxy 组监控,则为 Zabbix 服务器分配的 proxy 的 ID。

Property behavior:
- read-only

主机资产清单

主机资产清单对象具有以下属性。

每个属性都有其唯一的 ID 编号,用于将主机资产清单字段与监控项关联起来。

ID 属性 类型 描述 最大长度
4 alias string 别名。 128 characters
11 asset_tag string 资产标签。 64 characters
28 chassis string 机箱。 64 characters
23 contact string 联系人。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
32 contract_number string 合同编号。 64 characters
47 date_hw_decomm string 硬件退役日期。 64 characters
46 date_hw_expiry string 硬件维护到期日期。 64 characters
45 date_hw_install string 硬件安装日期。 64 characters
44 date_hw_purchase string 硬件购买日期。 64 characters
34 deployment_status string 部署状态。 64 characters
14 hardware string 硬件。 255 characters
15 hardware_full string 详细硬件信息。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
39 host_netmask string 主机子网掩码。 39 characters
38 host_networks string 主机网络。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
40 host_router string 主机路由器。 39 characters
30 hw_arch string 硬件架构。 32 characters
33 installer_name string 安装人员姓名。 64 characters
24 location string 位置。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
25 location_lat string 位置纬度。 16 characters
26 location_lon string 位置经度。 16 characters
12 macaddress_a string MAC 地址 A。 64 characters
13 macaddress_b string MAC 地址 B。 64 characters
29 model string 型号。 64 characters
3 name string 名称。 128 characters
27 notes string 备注。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
41 oob_ip string 带外 IP 地址。 39 characters
42 oob_netmask string 带外主机子网掩码。 39 characters
43 oob_router string 带外路由器。 39 characters
5 os string 操作系统名称。 128 characters
6 os_full string 详细操作系统名称。 255 characters
7 os_short string 简短操作系统名称。 128 characters
61 poc_1_cell string 主要联系人手机号码。 64 characters
58 poc_1_email string 主要联系人电子邮件。 128 characters
57 poc_1_name string 主要联系人姓名。 128 characters
63 poc_1_notes string 主要联系人备注。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
59 poc_1_phone_a string 主要联系人电话 A。 64 characters
60 poc_1_phone_b string 主要联系人电话 B。 64 characters
62 poc_1_screen string 主要联系人屏幕名称。 64 characters
68 poc_2_cell string 次要联系人手机号码。 64 characters
65 poc_2_email string 次要联系人电子邮件。 128 characters
64 poc_2_name string 次要联系人姓名。 128 characters
70 poc_2_notes string 次要联系人备注。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
66 poc_2_phone_a string 次要联系人电话 A。 64 characters
67 poc_2_phone_b string 次要联系人电话 B。 64 characters
69 poc_2_screen string 次要联系人屏幕名称。 64 characters
8 serialno_a string 序列号 A。 64 characters
9 serialno_b string 序列号 B。 64 characters
48 site_address_a string 站点地址 A。 128 characters
49 site_address_b string 站点地址 B。 128 characters
50 site_address_c string 站点地址 C。 128 characters
51 site_city string 站点城市。 128 characters
53 site_country string 站点国家。 64 characters
56 site_notes string 站点备注。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
55 site_rack string 站点机架位置。 128 characters
52 site_state string 站点州/省。 64 characters
54 site_zip string 站点 ZIP/邮政编码。 64 characters
16 software string 软件。 255 characters
18 software_app_a string 软件应用 A。 64 characters
19 software_app_b string 软件应用 B。 64 characters
20 software_app_c string 软件应用 C。 64 characters
21 software_app_d string 软件应用 D。 64 characters
22 software_app_e string 软件应用 E。 64 characters
17 software_full string 软件详细信息。 Depends on the database used:
- 65535 characters for SQL databases
- 2048 characters for Oracle databases
10 tag string 标签。 64 characters
1 type string 类型。 64 characters
2 type_full string 类型详细信息。 64 characters
35 url_a string URL A。 2048 characters
36 url_b string URL B。 2048 characters
37 url_c string URL C。 2048 characters
31 vendor string 供应商。 64 characters

主机标签

主机标签对象具有以下属性。

Property Type Description
tag string 主机标签名称。

Property behavior:
- required
value string 主机标签值。
automatic integer 主机标签类型。

可能的值:
0 - (default) 手动(由用户创建的标签);
1 - 自动(由低级别发现创建的标签)

Property behavior:
- read-only