[comment]: # ({0c384325-ae6d2ebd})
# 3 主机

[comment]: # ({/0c384325-ae6d2ebd})

[comment]: # ({9618b21e-305fb531})
#### 概览

在*配置 - >主机*中，用户可以配置和维护主机。

有一个显示现有主机及其详细信息的列表。

从右边的下拉菜单中有
*主机*栏，您可以选择是显示所有主机还是仅显示属于一个特定组的主机。

![](../../../../../assets/en/manual/web_interface/hosts.png){width="600"}

显示数据：

|列|述|
|---|---|
|*名称*                                                主|名称，单击主机名打开主机[配置表](/manual/config/hosts/host#configuring_a_host).|
|*元素（应用程序，监控项，触发器，图形，发现，Web）*   单击元素名称将显示主机的项目，触发器等。 各|元素的数量以灰色显示。|
|*界面*                                                显|主机的主界面。|
|*模板*                                                显|与主机链接的模板。 如果链接的模板中包含其他模板，那么它们将显示在括号中，以逗号分隔。单击模板名称将打开其配置表单。|
|*状态*                                                显|主机状态 - *启用* 或是 *禁止*. 点击状态可以更改。|
|*可用性*                                              显示|机的[可用性](/manual/web_interface/frontend_sections/configuration/hosts#reading_host_availability)。 四个图标各自表示支持的接口（Zabbix代理，SNMP，IPMI，JMX）。\\\\界面的当前状态由相应的颜色显示:<br>**绿色** - 可用<br>**红色** - 不可用（在鼠标悬停时，显示无法访问接口的原因的详细信息）<br>**灰色** - 知或未配置|
|*代理加密*                                            显示与|机连接的加密状态:<br>**None** - 没有加密<br>**PSK** - 使用预共享密钥<br>**Cert** - 使用证书<br>|
|*Info*|显示有关主机的错误信息（如果有）。|

点击右上角*创建主机* 按钮配置一个新的主机。点击右上角 *导入*
按钮从XML文件导入主机

[comment]: # ({/9618b21e-305fb531})

[comment]: # ({6a8a16df-6a4ac33b})
##### 批量编辑选项

列表下方的按钮提供了一些批量编辑选项：

-   *Enable* - 将主机状态更改为 *已监控*
-   *Disable* - 将主机状态更改为 *未被监控*
-   *Export* - 将主机导出为XML文件
-   *Mass update* -
    多个主机[多个属性更新](/manual/config/hosts/hostupdate)。
-   *Delete* - 删除主机

要使用这些选项，请在相应的主机之前标记复选框，然后单击所需的按钮。

[comment]: # ({/6a8a16df-6a4ac33b})

[comment]: # ({f94754bc-b14d85c6})
##### 过滤器

由于该列表可能包含很多主机，可能需要过滤出您真正需要的主机。

*过滤器*
链接在主机列表之上.如果您点击它，则可以使用过滤器，您可以通过名称，DNS，IP或端口号过滤主机。

![](../../../../../assets/en/manual/web_interface/hosts_filter.png){width="600"}

[comment]: # ({/f94754bc-b14d85c6})

[comment]: # ({ddde3f0e-aafce980})
#### 阅读主机可用性

主机可用性图标反映了Zabbix服务器上的当前主机接口状态。 因此，在前台：

-   如果禁用主机，可用性图标将不会立即变为灰色（未知状态），因为服务器必须首先同步配置更改;
-   如果启用主机，则可用性图标将不会立即变为绿色（可用），因为服务器必须同步配置更改并开始首先轮询主机。

[comment]: # ({/ddde3f0e-aafce980})

[comment]: # ({be7490dc-815a6c8c})
#### 未知主机状态

Zabbix服务器将主机可用性图标设置为相应代理接口（Zabbix，SNMP，IMP，JMX）的灰色（未知状态），如果：

-   界面上没有启用的项目（它们被删除或禁用）;
-   主机已禁用;
-   主机被设置为由代理监视，不同的代理或由服务器监视，如果它被代理监视;
-   主机由看起来处于脱机状态的代理进行监控（在最大心跳间隔（1小时）内没有从代理收到更新）。

```{=html}
<!-- -->
```
    * 

请参阅有关主机的更多细节[unreachability](/manual/appendix/items/unreachability).

#### Reading host availability

Host availability icons reflect the current host interface status on
Zabbix server. Therefore, in the frontend:

-   If you disable a host, availability icons will not immediately turn
    gray (unknown status), because the server has to synchronize the
    configuration changes first;
-   If you enable a host, availability icons will not immediately turn
    green (available), because the server has to synchronize the
    configuration changes and start polling the host first.

#### Unknown host status

Zabbix server sets the host availability icon to gray (unknown status)
for the corresponding agent interface (Zabbix, SNMP, IMP, JMX) if:

-   there are no enabled items on the interface (they were removed or
    disabled);
-   host is disabled;
-   host is set to be monitored by proxy, a different proxy or by server
    if it was monitored by proxy;
-   host is monitored by a proxy that appears to be offline (no updates
    received from the proxy during the maximum heartbeat interval - 1
    hour).

Setting host availability to unknown is done after server configuration
cache synchronization. Restoring host availability
(available/unavailable) on hosts monitored by proxies is done after
proxy configuration cache synchronization.

See also more details about host
[unreachability](/manual/appendix/items/unreachability).

[comment]: # ({/be7490dc-815a6c8c})
