1 配置模板
概述
创建模板
要创建模板,请执行以下操作:
- 点击创建模板
- 编辑模板属性
模板选项卡包含常规模板属性。
所有必填字段都标有红色星号。
模板属性:
标签 选项卡允许您定义模板级别标签。链接了此模板的所有主机的所有问题,将使用此处输入的标签。
标签支持用户宏、{INVENTORY.*} 宏, {HOST.HOST}, {HOST.NAME},{HOST.CONN}, {HOST.DNS}, {HOST.IP}, {HOST.PORT} 和 {HOST.ID} 宏。
宏 选项卡允许您将模板级 定义为键值对。 请注意,宏的值可以保存为纯文本、机密文本或 Vault秘钥。 还支持添加描述。
为方便起见,提供了相应模板和全局宏配置的链接。也可以在模板级别上编辑嵌套模板/全局宏,有效地创建模板上宏的副本。
值映射选项卡允许在 值映射中配置监控项数据的人性化展示。
按钮:
添加模板。添加的模板应该出现在列表中。 | |
![]() | 更新现有模板的属性。 |
根据当前模板的属性创建另一个模板,包括从链接模板继承的实体(监控项,触发器等) | |
![]() | 基于当前模板的属性创建另一个模板,包括从链接的模板继承并直接附加到当前模板的实体(监控项,触发器等)。 |
删除模板; 模板(监控项,触发器等)的实体与链接的主机保留。 | |
![]() | 从链接的主机中删除模板及其所有实体。 |
取消编辑模板属性。 |
创建一个模板,可以开始添加一些实体。
监控项必须首先添加到模板中。如果没有相应的监控项,则无法添加触发器和图形。
添加监控项,触发器,图形
要向模板添监控项,请执行以下操作:
- 转到配置→主机(或模板)
- 单击所需主机/模板行中的监控项
- 标记要添加到模板的监控项的复选框
- 点击监控项列表下面的复制
- 选择要复制的监控项的模板(或模板组),然后单击复制
所有选定的监控项都应该被复制到模板中。
添加触发器和图形以类似的方式完成(分别从触发器和图形列表),请记住,只有在首先添加所需监控项时,才能添加它们。
添加仪表盘
要在配置 → 模板中添加仪表盘,请执行以下操作:
- 按照通常的配置仪表盘的方法
有关访问从模板仪表板创建的主机仪表板的详细信息,请参阅主机仪表盘。
配置低级别自动发现规则
请参阅手册的低级别自动发现部分。
添加Web场景
在模板的配置 → 模板中添加Web场景,请执行以下操作:
- 点击模板行中的Web
- 按照配置Web场景的通常方式配置Web场景
Creating a template group
Only Super Admin users can create template groups.
To create a template group in Zabbix frontend, do the following:
- Go to: Configuration → Template groups
- Click on Create template group in the upper right corner of the screen
- Enter the group name in the form
To create a nested template group, use the ‘/‘ forward slash separator, for example Linux servers/Databases/MySQL
. You can create this group even if none of the two parent template groups () exist. In this case creating these parent template groups is up to the user; they will not be created automatically.
Leading and trailing slashes, several slashes in a row are not allowed. Escaping of ‘/‘ is not supported.
Once the group is created, you can click on the group name in the list to edit group name, clone the group or set additional option:
Apply permissions to all subgroups - mark this checkbox and click on Update to apply the same level of permissions to all nested template groups. For user groups that may have had differing permissions assigned to nested template groups, the permission level of the parent template group will be enforced on the nested groups. This is a one-time option that is not saved in the database.
- When creating a child template group to an existing parent template group, permissions to the child are inherited from the parent (for example, when creating
Databases/MySQL
if already exists)