【免费下载链接】community-templates
Zabbix Community Templates repository
本指南以 community-templates 仓库中的 SNMP McAfee Email Gateway 模板 为核心,系统讲解该模板的 OID 设计、72 个监控项的采集语义、SMTP/POP3 安全防护全链路的监控思路,以及在不同 Zabbix 版本下的导入与配置方法。读完本文,你将能够独立完成 McAfee Email Gateway(邮件安全网关设备)的 SNMP 接入、指标解读与告警方案设计。
模板背景与适用场景
该模板由 Samuel Martins 于 2019-04-24 创建,版本号 1.00,其全名为SNMP McAfee Email Gateway (SMTP - POP3),在仓库中位于 Network_Appliances/template_mcafee_email_gateway 目录下,并同时提供 Zabbix 5.0(XML 格式)、5.4 与 6.0(YAML 格式)三个版本的导出文件。
模板的设计目标是:
- 基于厂商私有 MIBMCAFEE-SCM-MIB构建,覆盖 McAfee Email Gateway(邮件安全网关)的 SMTP 与 POP3 两条安全监控通道;
- 作者在设备版本 5.5上完成实测,并认为其 OID 结构可以兼容其他版本;
- 需要特别注意的是,该设备当前已处于End-of-Life(生命周期结束)状态,官方公告链接见 5.0/README.md 中的说明。因此在引入生产监控前,应结合自身的迁移/下线计划评估使用周期。
从模板元数据看,该模板不包含宏(Macros)、模板链接(Template links)、发现规则(Discovery rules)与触发器(Triggers),其价值全部集中在 72 个 SNMP 监控项上。这也意味着部署后需要由使用者自行补充告警规则(详见后文"使用建议与已知限制")。
工作原理:MCAFEE-SCM-MIB 与 OID 树布局
模板全部监控项均采用 Zabbix 的SNMP agent采集类型(XML 中type=SNMP_AGENT),即 Zabbix Server/Proxy 直接向设备的 UDP 161 端口发起 SNMP GET 请求,无需在被监控设备上安装任何 Agent。
从 5.0/template_mcafee_email_gateway.xml 的snmp_oid字段可以看到,所有 OID 均位于企业私有分支:
.1.3.6.1.4.1.1230.2.3.1.2其中.1.3.6.1.4.1是 IANA 分配的企业(enterprise)前缀,1230对应 McAfee(Network Associates)的企业编号。继续向下,从 XML 中 72 个 OID 的规律可以推断出 MIB 的子树划分方式:
| OID 子树 | 覆盖内容 | 对应应用分组 |
|---|---|---|
.2.3.1.2.1.1 | SNMP Agent 模块信息(主机名、版本) | SNMP Agent |
.2.3.1.2.3.1 | 系统资源(CPU、内存、交换、负载) | System |
.2.3.1.2.3.2 | 协议健康状态(SMTP/POP3 State) | Health |
.2.3.1.2.4.1 | SMTP 连接统计与威胁检测计数 | SMTP |
.2.3.1.2.4.2 | SMTP 邮件处理与各类拦截计数 | SMTP |
.2.3.1.2.4.3 | SMTP 各校验环节的拒绝计数 | SMTP |
.2.3.1.2.8.1 | POP3 连接统计与威胁检测计数 | POP3 |
.2.3.1.2.8.2 | POP3 邮件数量统计 | POP3 |
.2.3.1.2.11.1 | 各类延迟/隔离队列深度 | Queues-Deferred |
以上子树语义(如
4.x为 SMTP、8.x为 POP3、11.x为队列)是根据 72 个 OID 的编号规律与监控项描述推断得出的,并非 MIB 原文中的节点命名;具体节点名称以 MCAFEE-SCM-MIB 官方定义为准。
一个值得注意的细节是:绝大多数计数型监控项是"累计计数器"(如 "Total of Emails Delivered Successfully"、"Number of Viruses Detected"),其语义是自设备启动/统计周期以来的累计值,而非瞬时速率。在后续做告警与趋势分析时,应使用 Zabbix 的change()、rate()等预处理或触发器函数来观察增量变化。
完整监控项清单(按应用分组)
以下表格完整继承了 5.0/README.md 的监控项清单,并补充了从 XML 中提取的 OID、单位与取值类型。更新周期方面:除 SNMP Agent 组为 1 小时外,其余监控项在 README 中均标注为 1 分钟。
SNMP Agent 组
| 监控项 | 说明 | Key | OID | 周期/类型 |
|---|---|---|---|---|
| Hostname | The hostname of the SNMP Agent module | agent-hostname | .1.3.6.1.4.1.1230.2.3.1.2.1.1.2.0 | 1h / TEXT |
| SNMP Agent Version | The version of the SNMP Agent module | agent-scm-module-version | .1.3.6.1.4.1.1230.2.3.1.2.1.1.1.0 | 1h / TEXT |
System 组
| 监控项 | 说明 | Key | OID | 周期/单位 |
|---|---|---|---|---|
| CPU Overall Usage | Shows the overall usage of one or more processors | cpu-busy | .1.3.6.1.4.1.1230.2.3.1.2.3.1.1.0 | 1m / % |
| Memory Usage | Shows the processor memory usage | mem-used | .1.3.6.1.4.1.1230.2.3.1.2.3.1.2.0 | 1m / B |
| Memory Free | Shows the processor memory free | mem-free | .1.3.6.1.4.1.1230.2.3.1.2.3.1.3.0 | 1m / B |
| Memory Swap Rate | Shows the processor memory swap rate | swaprate | .1.3.6.1.4.1.1230.2.3.1.2.3.1.5.0 | 1m / B |
| Load Average | Shows the load average for the appliance | loadaverage | .1.3.6.1.4.1.1230.2.3.1.2.3.1.6.0 | 1m |
Health 组
| 监控项 | 说明 | Key | OID | 周期 |
|---|---|---|---|---|
| SMTP State | The health of the SMTP protocol | smtp-state | .1.3.6.1.4.1.1230.2.3.1.2.3.2.1.0 | 1m |
| POP3 State | The health of the POP3 protocol | pop3-state | .1.3.6.1.4.1.1230.2.3.1.2.3.2.2.0 | 1m |
Queues-Deferred 组
| 监控项 | 说明 | Key | OID | 周期 |
|---|---|---|---|---|
| Number of Messages in the Deferred Queue | Number of messages in the deferred queue | deferred-smtp-mails | .1.3.6.1.4.1.1230.2.3.1.2.11.1.1.0 | 1m |
| Number of Messages in the Quarantine Queue | Number of messages in the quarantine queue | deferred-quarantine-mails | .1.3.6.1.4.1.1230.2.3.1.2.11.1.2.0 | 1m |
| Number of Messages in the MQM Queue | Number of messages in the MQM queue | deferred-tqmd-mails | .1.3.6.1.4.1.1230.2.3.1.2.11.1.3.0 | 1m |
| Number of messages in the Logging Queue | Number of messages in the logging queue | deferred-logging-mails | .1.3.6.1.4.1.1230.2.3.1.2.11.1.4.0 | 1m |
SMTP 组
连接统计与威胁检测(OID 子树 4.1)
| 监控项 | 说明 | Key | OID | 周期/单位 |
|---|---|---|---|---|
| Total Data Transferred Through a SMTP Proxy | Total data transferred through a proxy | smtp-TotalBytes | .1.3.6.1.4.1.1230.2.3.1.2.4.1.1.0 | 1m / B |
| SMTP Total Connections | Total connections used | smtp-TotalConnections | .1.3.6.1.4.1.1230.2.3.1.2.4.1.2.0 | 1m |
| SMTP Blocked Connections | Connections that have been blocked | smtp-BlockedConnections | .1.3.6.1.4.1.1230.2.3.1.2.4.1.3.0 | 1m |
| SMTP Total Virus Detected | Total number of viruses detected | smtp-virus-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.4.0 | 1m |
| Number of Viruses Detected From SMTP Inside | Number of viruses detected from inside | smtp-from-inside-virus-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.5.0 | 1m |
| Number of Viruses Detected From SMTP Outside | Number of viruses detected from outside | smtp-from-outside-virus-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.6.0 | 1m |
| Total of SMTP PUPs Detected | Total number of potentially unwanted programs detected | smtp-pups-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.7.0 | 1m |
| Number of SMTP PUPs detected from inside | Number of potentially unwanted programs detected from inside | smtp-from-inside-pups-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.8.0 | 1m |
| Number of SMTP PUPs Detected From Outside | Number of potentially unwanted programs detected from outside | smtp-from-outside-pups-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.9.0 | 1m |
| Total of SMTP Packers Detected | Total number of packers detected | smtp-packers-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.10.0 | 1m |
| Number of SMTP Packers Detected From Inside | Number of packers detected from inside | smtp-from-inside-packers-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.11.0 | 1m |
| Number of SMTP Packers Detected from Outside | Number of packers detected from outside | smtp-from-outside-packers-detected | .1.3.6.1.4.1.1230.2.3.1.2.4.1.12.0 | 1m |
| Total of SMTP PUPs quarantined | Total number of potentially unwanted programs quarantined | smtp-quarantined-pups | .1.3.6.1.4.1.1230.2.3.1.2.4.1.13.0 | 1m |
| Total of Packers From SMTP Quarantined | Total number of packers quarantined | smtp-quarantined-packers | .1.3.6.1.4.1.1230.2.3.1.2.4.1.14.0 | 1m |
邮件处理与按原因拦截(OID 子树 4.2)
| 监控项 | 说明 | Key | OID | 周期 |
|---|---|---|---|---|
| Total of SMTP E-mail Messages | Total number of e-mail messages | smtp-messages | .1.3.6.1.4.1.1230.2.3.1.2.4.2.1.0 | 1m |
| Total of Emails Delivered Successfully | Total number of emails delivered successfully | smtp-deliver-ok | .1.3.6.1.4.1.1230.2.3.1.2.4.2.2.0 | 1m |
| Number of SMTP Deferred E-mail | Number of deferred E-mail | smtp-deferred | .1.3.6.1.4.1.1230.2.3.1.2.4.2.3.0 | 1m |
| Number of Virus Quarantined From SMTP E-mail | Number of Virus Quarantined E-mail | smtp-quarantined | .1.3.6.1.4.1.1230.2.3.1.2.4.2.4.0 | 1m |
| Number of Content Quarantined SMTP E-mail | Number of Content Quarantined E-mail | smtp-quarantined-content | .1.3.6.1.4.1.1230.2.3.1.2.4.2.5.0 | 1m |
| Number of Spam Quarantined SMTP E-mail | Number of Spam Quarantined E-mail | smtp-quarantined-spam | .1.3.6.1.4.1.1230.2.3.1.2.4.2.6.0 | 1m |
| Number of SMTP Virus Blocked | Number of viruses blocked | smtp-virus-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.7.0 | 1m |
| Number of SMTP Spam Blocked by SpamKiller | Number of spam blocked by SpamKiller | smtp-spam-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.8.0 | 1m |
| Number of SMTP Phish Blocked by SpamKiller | Number of phish blocked by SpamKiller | smtp-phish-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.9.0 | 1m |
| Number of SMTP PUPs blocked | Number of potentially unwanted program blocked | smtp-pup-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.10.0 | 1m |
| Number of SMTP Packers Blocked | Number of packers blocked | smtp-packer-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.11.0 | 1m |
| Number of SMTP Content-filtering Based Blocks | Number of content-filtering based blocks | smtp-content-filter-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.12.0 | 1m |
| Number of SMTP Compliancy Based Blocks | Number of compliancy based blocks | smtp-compliancy-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.13.0 | 1m |
| Number of SMTP Format Based Blocks | Number of format based blocks | smtp-format-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.14.0 | 1m |
| Number of SMTP Corrupted Contents Blocked | Number of corrupted contents blocked | smtp-corrupt-content-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.15.0 | 1m |
| Number of SMTP Encrypted Contents Blocked | Number of encrypted contents blocked | smtp-encrypted-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.16.0 | 1m |
| Number of SMTP Signed Messages Blocked | Number of signed messages blocked | smtp-signed-message-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.17.0 | 1m |
| Number of SMTP MIME Formats Blocked | Number of MIME formats blocked | smtp-mime-format-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.18.0 | 1m |
| Number of SMTP Directory Harvests Blocked | Number of directory harvests blocked | smtp-directory-harvest-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.19.0 | 1m |
| Number of SMTP Mails Blocked After Sender Authentication Check | Number of mails blocked after sender authentication check | smtp-sender-auth-blocked | .1.3.6.1.4.1.1230.2.3.1.2.4.2.20.0 | 1m |
各校验环节拒绝计数(OID 子树 4.3)
| 监控项 | 说明 | Key | OID | 周期 |
|---|---|---|---|---|
| Total of SMTP Emails Rejected For Exceeding The Cumulative Threshold Score | Total number of emails rejected for exceeding the cumulative threshold score (sum of all cumulative rejects) | smtp-threshold-exceeded-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.1.0 | 1m |
| Total of SMTP Emails Rejected Based on The Denied Sender List | Total number of emails rejected based on the denied sender list | smtp-deny-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.2.0 | 1m |
| Total of Recipients Rejected After Permit SMTP Recipient Check or LDAP Lookup | Total number of recipients rejected after permit recipient check or LDAP lookup | smtp-permit-rcpt-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.3.0 | 1m |
| Total of SMTP Emails Rejected due to Reputation Service Lookup | Total number of emails rejected due to reputation service lookup | smtp-ptin-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.4.0 | 1m |
| Total of SMTP Emails Rejected After Sender Policy Framework Check | Total number of emails rejected after Sender Policy Framework check | smtp-spf-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.5.0 | 1m |
| Total of SMTP Emails Rejected After SenderID Check | Total number of emails rejected after SenderID check | smtp-spfpra-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.6.0 | 1m |
| Total of Emails Rejected After RBL Check | Total number of emails rejected after RBL check | smtp-rbl-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.7.0 | 1m |
| Total of Rejected SMTP Mails After DKIM Signature Verification | Total number of rejected mails after DKIM signature verification | smtp-dkim-rejected | .1.3.6.1.4.1.1230.2.3.1.2.4.3.8.0 | 1m |
POP3 组
连接统计与威胁检测(OID 子树 8.1)
| 监控项 | 说明 | Key | OID | 周期 |
|---|---|---|---|---|
| POP3 Total Bytes | Total data transferred through a proxy | pop3-TotalBytes | .1.3.6.1.4.1.1230.2.3.1.2.8.1.1.0 | 1m |
| POP3 Total of Connections | Total connections used | pop3-TotalConnections | .1.3.6.1.4.1.1230.2.3.1.2.8.1.2.0 | 1m |
| POP3 Blocked Connections | Connections that have been blocked | pop3-BlockedConnections | .1.3.6.1.4.1.1230.2.3.1.2.8.1.3.0 | 1m |
| POP3 Virus Detected | Total number of viruses detected | pop3-virus-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.4.0 | 1m |
| Number of POP3 Viruses Detected from Inside | Number of viruses detected from inside | pop3-from-inside-virus-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.5.0 | 1m |
| Number of POP3 Viruses Detected from Outside | Number of viruses detected from outside | pop3-from-outside-virus-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.6.0 | 1m |
| Total of PUPs from POP3 detected | Total number of potentially unwanted programs detected | pop3-pups-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.7.0 | 1m |
| Number of POP3 PUPs from inside | Number of potentially unwanted programs detected from inside | pop3-from-inside-pups-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.8.0 | 1m |
| Number of POP3 PUPs Detected from Outside | Number of potentially unwanted programs detected from outside | pop3-from-outside-pups-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.9.0 | 1m |
| Total of POP3 Packers Detected | Total number of packers detected | pop3-packers-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.10.0 | 1m |
| Number of POP3 Packers Setected from Inside | Number of packers detected from inside | pop3-from-inside-packers-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.11.0 | 1m |
| Number of POP3 Packers Detected from Outside | Number of packers detected from outside | pop3-from-outside-packers-detected | .1.3.6.1.4.1.1230.2.3.1.2.8.1.12.0 | 1m |
| Total number of POP3 PUPs quarantined | Total number of potentially unwanted programs quarantined | pop3-quarantined-pups | .1.3.6.1.4.1.1230.2.3.1.2.8.1.13.0 | 1m |
| Total of POP3 Packers Quarantined | Total number of packers quarantined | pop3-quarantined-packers | .1.3.6.1.4.1.1230.2.3.1.2.8.1.14.0 | 1m |
邮件数量统计(OID 子树 8.2)
| 监控项 | 说明 | Key | OID | 周期 |
|---|---|---|---|---|
| Total of POP3 E-mail Messages | Total number of e-mail messages | pop3-messages | .1.3.6.1.4.1.1230.2.3.1.2.8.2.1.0 | 1m |
| Number of POP3 E-mail Messages from Inside | Number of e-mail messages from inside | pop3-from-inside-messages | .1.3.6.1.4.1.1230.2.3.1.2.8.2.2.0 | 1m |
| Number of POP3 E-mail Messages from Outside | Number of e-mail messages from outside | pop3-from-outside-messages | .1.3.6.1.4.1.1230.2.3.1.2.8.2.3.0 | 1m |
关键监控维度深度解读
SMTP:从连接到投递的全链路监控
SMTP 子树(.2.3.1.2.4)是模板的核心。借助 OID 分层的规律,可以还原出设备内部的统计模型:
- 连接层(4.1.x 前 3 项):
smtp-TotalConnections(总连接数)、smtp-TotalBytes(经代理传输的总字节数,单位为 B)、smtp-BlockedConnections(被拦截的连接数)。这三个指标共同刻画了入口流量规模与被拒比例。 - 处理层(4.2.x):
smtp-messages(邮件总量)、smtp-deliver-ok(成功投递数)、smtp-deferred(延迟数)构成投递链路的三要素;smtp-quarantined、smtp-quarantined-content、smtp-quarantined-spam则分别统计病毒、内容、垃圾邮件的隔离数量。 - 拒绝层(4.3.x):将拒绝原因细分为累计阈值超限、拒绝发件人列表、收件人校验/LDAP 查询、信誉服务查询、SPF、SenderID、RBL、DKIM 八个维度。
这一"连接 → 处理 → 拒绝"的三层结构,让运维人员可以快速定位邮件流量异常是发生在入口(连接被拒)、处理(投递失败/隔离)还是校验(鉴权拒绝)环节。
SMTP 安全防护:病毒 / PUP / Phish / Packer
模板对四类威胁对象分别建立了"检测(detected)— 拦截(blocked)— 隔离(quarantined)"的完整统计,并且每类都区分from inside(内发)与from outside(外收)两个方向:
| 威胁类型 | 检测计数 | 拦截计数 | 隔离计数 |
|---|---|---|---|
| 病毒 Virus | smtp-virus-detected / smtp-from-inside-virus-detected / smtp-from-outside-virus-detected | smtp-virus-blocked | smtp-quarantined |
| 潜在有害程序 PUP | smtp-pups-detected / smtp-from-inside-pups-detected / smtp-from-outside-pups-detected | smtp-pup-blocked | smtp-quarantined-pups |
| 打包程序 Packer | smtp-packers-detected / smtp-from-inside-packers-detected / smtp-from-outside-packers-detected | smtp-packer-blocked | smtp-quarantined-packers |
| 钓鱼 Phish | — | smtp-phish-blocked(SpamKiller) | — |
这种"方向 × 威胁类型 × 处置阶段"的三维拆分,为安全运营提供了极高的可观测性:例如当smtp-from-outside-virus-detected突增而smtp-virus-blocked未同步上升时,很可能意味着病毒特征库未及时更新或拦截策略被放宽,需要立即核查。
反垃圾与发件人信誉校验
在拒绝计数(4.3.x)与拦截计数(4.2.x)中,模板覆盖了邮件安全网关主流的发件人信誉验证链路:
- SpamKiller 反垃圾引擎:
smtp-spam-blocked(垃圾邮件拦截)、smtp-phish-blocked(钓鱼拦截); - 发件人身份校验:
smtp-sender-auth-blocked(发送方认证后拦截)、smtp-deny-rejected(拒绝发件人列表)、smtp-permit-rcpt-rejected(收件人白名单/LDAP 查询拒绝); - 开放标准协议校验:
smtp-spf-rejected(SPF)、smtp-spfpra-rejected(SenderID)、smtp-dkim-rejected(DKIM)、smtp-rbl-rejected(实时黑名单)、smtp-ptin-rejected(信誉服务查询); - 内容与合规策略:
smtp-content-filter-blocked(内容过滤)、smtp-compliancy-blocked(合规性)、smtp-format-blocked(格式)、smtp-mime-format-blocked(MIME 格式)、smtp-encrypted-blocked(加密内容)、smtp-corrupt-content-blocked(损坏内容)、smtp-signed-message-blocked(签名邮件)、smtp-directory-harvest-blocked(目录收割攻击)。
这些计数项的联动分析,可以帮助判断一封被拒邮件究竟是因为"策略配置"还是"协议校验失败",从而区分误拒(False Positive)与真实攻击。
POP3 通道监控
POP3 子树(.2.3.1.2.8)与 SMTP 类似,同样提供总字节数、总连接数、被拦截连接数、病毒/PUP/Packer 检测与隔离计数,并区分 inside/outside 方向;pop3-messages、pop3-from-inside-messages、pop3-from-outside-messages三项则统计邮件数量。值得注意的是,POP3 通道在模板中没有独立的拦截原因拆分(如 spam/phish),其安全统计以"检测 + 隔离"为主,这与 POP3 主要面向终端用户收信(retrieval)而非中继转发的协议特征相符。
邮件队列深度
Queues-Deferred应用组覆盖设备的四类队列:
deferred-smtp-mails:SMTP 延迟队列(投递失败等待重试);deferred-quarantine-mails:隔离队列;deferred-tqmd-mails:MQM 队列;deferred-logging-mails:日志队列。
队列深度是邮件网关健康度的敏感指标——deferred-smtp-mails持续增长通常意味着下游投递受阻或 DNS/路由异常,而隔离队列增长则往往对应安全事件的集中爆发。
系统健康与 SNMP Agent 信息
System组提供cpu-busy(CPU 总体使用率,%)、mem-used/mem-free(已用/空闲内存,B)、swaprate(交换率,B)、loadaverage(负载均值),用于监控设备自身的资源水位;Health组的smtp-state/pop3-state直接反映两个协议服务的健康状态;SNMP Agent组的agent-hostname与agent-scm-module-version则以 1 小时为周期采集设备身份与固件版本,便于资产审计与版本核对。
从 5.0/template_mcafee_email_gateway.xml 的value_type与units字段可以看到:仅agent-hostname与agent-scm-module-version显式声明为TEXT(字符串),其余监控项按默认数值类型存储;cpu-busy带%单位,内存与 SMTP 字节类指标带B单位,Zabbix 会自动完成单位换算与图形展示。另外,模板中"Number of POP3 Packers Setected from Inside"这一监控项名存在拼写瑕疵(Setected),属于原模板的历史遗留,不影响对应 Key 与 OID 的采集。
部署与配置
1. 选择与导入模板
根据 Zabbix Server 的版本选择对应的模板文件(三者的监控项集合完全一致,仅导出格式不同):
| Zabbix 版本 | 导入文件 |
|---|---|
| 5.0 | 5.0/template_mcafee_email_gateway.xml |
| 5.4 | 5.4/template_mcafee_email_gateway.yaml |
| 6.0 | 6.0/template_mcafee_email_gateway.yaml |
导入路径为 Zabbix Web 前端:Data collection → Templates → Import,选择文件并保留默认选项导入。导入后可在模板列表中找到SNMP McAfee Email Gateway (SMTP - POP3)。这也是仓库根目录 README.md 所描述的标准模板使用流程的第一步(下载 → 导入 → 按配置要求配置 → 关联主机)。
2. 关联主机并配置 SNMP 接口
在 Host 配置中:
- 为 McAfee Email Gateway 主机添加SNMP interfaces,填写设备 IP/DNS,端口保持默认 161;
- 在Macros中按设备实际配置设置 SNMP 参数(若设备使用非默认 community,可覆盖模板宏):
{$SNMP_COMMUNITY}:读写/只读 community 字符串,默认通常为public;{$SNMPV3_AUTHPASSPHRASE}、{$SNMPV3_PRIVPASSPHRASE}等(若启用 SNMPv3,需在设备端开启并对齐用户、认证与加密算法);
- 将模板链接到该主机:Host → Templates → Link new templates → SNMP McAfee Email Gateway (SMTP - POP3);
- 确认设备端已启用 SNMP Agent(McAfee Email Gateway 管理界面中开启 SNMP 服务并放行 Zabbix Server 的源地址)。
3. 验证采集
链接模板后,进入Data collection → Hosts → 对应主机 → Items,确认 72 个监控项均已启用且处于Enabled状态;再到Latest data页面观察smtp-messages、cpu-busy、smtp-state等关键项是否返回数值。若出现Not supported,通常由 SNMP community 不匹配、版本不一致或设备 SNMP 服务未启用导致。
使用建议与已知限制
- 无内置触发器:模板不包含任何触发器(5.0/README.md 中明确 "There are no triggers in this template"),部署后需自行创建告警。推荐优先为以下场景建立触发规则:
smtp-state/pop3-state非正常值(协议健康);deferred-smtp-mails持续增长(投递受阻);smtp-from-outside-virus-detected、smtp-rbl-rejected、smtp-dkim-rejected的rate()或change()突增(安全事件);cpu-busy、mem-used持续高位(设备资源耗尽);agent-scm-module-version变化(固件变更审计)。
- 无发现规则(LLD):模板为纯静态 SNMP 采集,不依赖任何自动发现流程,OID 固定,结构简单、易于排障。
- 累计计数器语义:绝大多数计数项为累计值,用于告警时应使用
change()/rate()等增量函数,避免用绝对值触发。 - 设备生命周期:McAfee Email Gateway 已进入 EOL,模板实测基准为设备 5.5 版本,作者认为可兼容其他版本;正式上线前建议先在目标固件版本上做一轮 SNMP walk 校验(如
snmpwalk -v2c -c community <ip> .1.3.6.1.4.1.1230.2.3.1.2),确认 OID 返回值符合预期。 - 只读监控:模板全部监控项均为只读 GET 采集,不会对设备产生任何写操作,可放心部署。
参考资料
- Network_Appliances/template_mcafee_email_gateway/5.0/README.md:模板原始说明与监控项清单(含描述、Key、更新周期)
- Network_Appliances/template_mcafee_email_gateway/5.0/template_mcafee_email_gateway.xml:Zabbix 5.0 导出文件(含全部 OID、单位、取值类型、应用分组)
- Network_Appliances/template_mcafee_email_gateway/5.4/template_mcafee_email_gateway.yaml:Zabbix 5.4 YAML 导出文件
- Network_Appliances/template_mcafee_email_gateway/6.0/template_mcafee_email_gateway.yaml:Zabbix 6.0 YAML 导出文件
- README.md:community-templates 仓库总览与模板导入/使用流程说明
【免费下载链接】community-templates
Zabbix Community Templates repository
相关推荐
Zabbix APC UPS by SNMP 监控模板全解:基于 PowerNet-MIB 的 UPS 实时监控与告警实战
Zabbix APC UPS by SNMP 监控模板全解:基于 PowerNet MIB 的 UPS 实时监控与告警实战 本篇技术指南围绕 Zabbix 官方
指标监控可观测性告警运维Zabbix 官方模板详解:APC UPS Galaxy 3500 的 SNMP 监控指南(PowerNet-MIB)
Zabbix 官方模板详解:APC UPS Galaxy 3500 的 SNMP 监控指南(PowerNet MIB) 导读 本文围绕 Zabbix 仓库内置的
指标监控可观测性告警运维Zabbix 官方 DELL PowerEdge R740 SNMP 监控模板实战:基于 iDRAC-MIB-SMIv2 的免脚本硬件全量监控
Zabbix 官方 DELL PowerEdge R740 SNMP 监控模板实战:基于 iDRAC MIB SMIv2 的免脚本硬件全量监控 本文面向 Zab
指标监控可观测性告警运维
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考