Sidebar

Zabbix Summit 2022
Register for Zabbix Summit 2022

2 SMS

2 SMS

概述

Overview

Zabbix支持使用连接到Zabbix服务器的串行端口的串行GSM调制解调器发送SMS消息。

Zabbix supports the sending of SMS messages using a serial GSM modem connected to Zabbix server's serial port.

需要确保如下:

Make sure that:

  • 串行设备的速度(在Linux下通常为/dev/ttyS0)与GSM调制解调器的速度相匹配。Zabbix没有设置串行链路的速度。它使用默认设置。
  • 'zabbix'用户对串行设备有读/写访问权。运行命令ls -l /dev/ttyS0来查看串口设备的当前权限。
  • GSM调制解调器输入PIN码,并在电源复位后保留PIN码。或者,您可以在SIM卡上禁用PIN。可以通过在终端软件(如Unix minicom或Windows超级终端)中发出命令AT + CPIN =“NNNN”(NNNN是您的PIN号,引号必须存在)来输入PIN。
  • The speed of the serial device (normally /dev/ttyS0 under Linux) matches that of the GSM modem. Zabbix does not set the speed of the serial link. It uses default settings.
  • The 'zabbix' user has read/write access to the serial device. Run the command ls –l /dev/ttyS0 to see current permissions of the serial device.
  • The GSM modem has PIN entered and it preserves it after power reset. Alternatively you may disable PIN on the SIM card. PIN can be entered by issuing command AT+CPIN="NNNN" (NNNN is your PIN number, the quotes must be present) in a terminal software, such as Unix minicom or Windows HyperTerminal.

Zabbix已经使用这些GSM调制解调器进行了测试:

Zabbix has been tested with these GSM modems:

  • Siemens MC35
  • Teltonika ModemCOM/G10
  • Siemens MC35
  • Teltonika ModemCOM/G10

要将SMS配置为邮件的传送通道,需将SMS配置为媒体类型,并输入相应的电话号码。

To configure SMS as the delivery channel for messages, you also need to configure SMS as the media type and enter the respective phone numbers for the users.

配置

Configuration

要将SMS配置为媒介类型:

To configure SMS as the media type:

  • 进入管理 - >媒介类型
  • 点击 创建媒介类型 (或者点击预定义的媒介类型列表中的 SMS).
  • Go to Administration → Media types
  • Click on Create media type (or click on SMS in the list of pre-defined media types).

媒介类型属性:

The Media type tab contains general media type attributes:

参数 说
Description 媒介类型的名称.
Type 选择 SMS 为媒介类型.
GSM modem 设置GSM调制解调器的串行设备名称.
Parameter Description
Description Name of the media type.
Type Select SMS as the type.
GSM modem Set the serial device name of the GSM modem.

Options 标签页包含了与其它媒介常见的告警设置 。请注意,并行发送SMS通知是不可能的。

The Options tab contains alert processing settings that are common for all media types. Note that parallel processing of sending SMS notifications is not possible.

用户媒介

User media

为用户分配电话号码:

To assign a phone number to the user:

  • 进入 管理 - >用户
  • 打开用户属性窗体
  • 在媒介选项卡中,单击 Add
  • Go to Administration → Users
  • Open the user properties form
  • In Media tab, click on Add

用户媒介属性:

User media attributes:

参数 说
Type 选择SMS作为媒介类型.
Send to 指定要发送消息的电话号码.
When active 您可以限制邮件发送的时间,例如仅限工作日(1-5,09:00-18:00).格式描述请参见 时间段规则 页面.
Use if severity 标记您要接收通知的触发严重性的复选框.
Status 媒介的状态
Enabled - 使用中.
Disabled - 禁用.
Parameter Description
Type Select SMS as the type.
Send to Specify the phone number to send messages to.
When active You can limit the time when messages are sent, for example, the working days only (1-5,09:00-18:00).
See the Time period specification page for description of the format.
Use if severity Mark the checkboxes of trigger severities that you want to receive notifications for.
Note that the default severity ('Not classified') must be checked if you want to receive notifications for non-trigger events.
After saving, the selected trigger severities will be displayed in the corresponding severity colours while unselected ones will be greyed out.
Status Status of the user media.
Enabled - is in use.
Disabled - is not being used.