Zabbix is an open source monitoring system that enterprises use more frequently. Zabbix phone and text message alarm is an indispensable alarm channel for operation and maintenance.
The previous article introduced how to send phone SMS alarms through the Spug Push Assistant through the Spug Push Assistant, but the user feedback that the Zabbix4.x version is very different. This article introduces how to implement Zabbix phone SMS and various robot alarms based on the Zabbix4.x version. After configuration, it was found that this usage document is also applicable to the Zabbix5 configuration steps!
Open the push assistant official website, select the Zabbix template
push assistant official website push.spug.cc / Template Market / Zabbix template / Use template / Configure the template object
Copy Save template encoding
After the push object is configured, copy the template ID
ZabbixAdd alarm media
• Zabbix / Administration / Media Types / create media type
Name: Push Assistant Alarm Type: ScriptScript name: spug_push_alert.shScript parameters1: abPampgaabc //Paste the above copy of the push assistant template encoding Script parameters2: {ALERT.MESSAGE}
Add zabbix alarm alarm script
Login to zabbix-server server, add zabbix-executed alarm media script
$ vim /usr/lib/zabbix/alerscripts/spug_push_alert.sh#!/bin/bash/usr/bin/curl -X POST -d "$2" https://push.spug.cc/send/$1# Add script execution permissions $ chmod +x/usr/lib/zabbix/alerscripts/spug_push.sh
Add Zabbix Alarm User
Zabbix / Administration / Users / create user / Media Select the [push assistant alarm] created above / Add
Add Zabbix trigger
Zabbix / Configuration / Action / create action
Action / Operations / Copy and add the following Operations-Default message default message content • Operations / New / operation detail / Send to User / Select Push Assistant Phone SMS Alarm User / Add Save
# Operations - Default message: status={TRIGGER.STATUS}&name={EVENT.NAME}&severity={EVENT.SEVERITY}&date={EVENT.DATE}&time={EVENT.TIME}&age={EVENT.AGE}&ip={HOST.IP}&hostname={HOST.NAME}&key={TRIGGER.KEY1}&value={ITEM.LASTVALUE}
• Action / Recovery options / default message / Copy and add the following Recovery options - Default message Default message content • Operations / New / operation detail / Send to User / Select Push Assistant Phone SMS Alarm User / Add Save
# Recovery options - Default message: status={TRIGGER.STATUS}&name={EVENT.NAME}&severity={EVENT.SEVERITY}&date={EVENT.DATE}&time={EVENT.TIME}&age={EVENT.AGE}&ip={HOST.IP}&hostname={HOST.NAME }&key={TRIGGER.KEY1}&value={ITEM.LASTVALUE}&recovery_date={EVENT.RECOVERY.DATE}&recovery_time={EVENT.RECOVERY.TIME}
Verify phone, text messages, robot alarm
• You can use the stress pressure test command to manually trigger the alarm and test the alarm sending.
View log
Push Assistant Platform/Push Log You can also see the sent historical messages.
About Spug Push Assistant:
Push Assistant is a multi-channel message push platform that integrates phone, text messages, emails, Feishu , Dingding , WeChat, enterprise WeChat and other multi-channel message push platform. Users only need to call a simple URL to complete multi-channel message push. Link: push.spug.cc
For more information, videos, welcome to follow the official account: Spug Community