一 宏介绍
Zabbix宏的作用是便于在模板、Items、Trigger中的引用,名称为{$名称},宏的字符范围为:A~Z/0~9/_。
如:net.tcp.service[ssh,{$SSH_PORT}]
其中{$SSH_PORT}为宏。
二 相关宏介绍及配置
2.1 全局宏
作用范围:模板、主机
配置步骤:Administration---->General---->Macros
默认的宏为:{$SNMP_COMMUNITY}
2.2 模板宏
作用范围:当前模板
配置步骤:Configuration---->Templates
2.3 主机宏
作用范围:当前主机
配置步骤:Configuration---->Hosts---->Zabbix server---->Macros