2022 Zabbix中国峰会
2022 Zabbix中国峰会

1 发送消息

1 Sending message

概述

Overview

发送消息是通知人们遇到问题的最佳方式之一。 这就是为什么它是Zabbix提供的主要动作之一。

Sending a message is one of the best ways of notifying people about a problem. That is why it is one of the primary actions offered by Zabbix.

配置

Configuration

为了能够发送和接收Zabbix的通知,您必须:

To be able to send and receive notifications from Zabbix you have to:

<note warning>如果您想要接收如发现、代理自动注册等非触发类的事件通知,那么在用户媒介中必须检查下默认的触发器级别 ('Not classified') configuration. :::

The default trigger severity ('Not classified') must be checked in user media configuration if you want to receive notifications for non-trigger events such as discovery, active agent auto-registration or internal evens.

<note important>Zabbix仅向至少有主机“读”权限的用户发送事件通知。至少,该用户须可访问配置了触发器表达式的主机。 :::

Zabbix sends notifications only to those users that have at least 'read' permissions to the host that generated the event. At least one host of a trigger expression must be accessible.

您可以配置使用 通知升级发送消息的自定义场景。

You can configure custom scenarios for sending messages using escalations.

要成功接收和阅读Zabbix的电子邮件,电子邮件服务器/客户端必须支持标准的“SMTP/MIME电子邮件”格式,因为Zabbix发送UTF-8数据(如果主题仅包含ASCII字符,则不是UTF-8编码)。消息的主题和主体是base64编码,遵循“SMTP/MIME电子邮件”格式标准。

To successfully receive and read e-mails from Zabbix, e-mail servers/clients must support standard 'SMTP/MIME e-mail' format since Zabbix sends UTF-8 data (If the subject contains ASCII characters only, it is not UTF-8 encoded.). The subject and the body of the message are base64-encoded to follow 'SMTP/MIME e-mail' format standard.

Message limit after all macros expansion is the same as message limit for Remote commands.

跟踪消息

Tracking messages

您可以在监控 - >问题中查看发送的消息的状态。

You can view the status of messages sent in Monitoring → Problems.

Actions column 您可以看到有关所采取actions的汇总信息。在那里绿色的数字表示发送的消息,红色的-失败的消息。进行中表示启动了一个动作。失败通知没有成功执行任何操作。

In the Actions column you can see summarized information about actions taken. In there green numbers represent messages sent, red ones - failed messages. In progress indicates that an action is initiated. Failed informs that no action has executed successfully.

如果您点击活动时间查看活动详细信息,您还将看到消息动作块包含由于事件发送(或未发送)的消息的详细信息。

If you click on the event time to view event details, you will also see the Message actions block containing details of messages sent (or not sent) due to the event.

报表→动作日志您将看到为配置操作的那些事件所采取的所有操作的详细信息。

In Reports → Action log you will see details of all actions taken for those events that have an action configured.