Professional Documents
Culture Documents
zabbix-gammu-smsd Pages 1
Find a Page…
send sms from zabbix server to phone number in case of events.
zabbix gammu smsd
receive sms from phone number and execute appropriate script based on sms text. Installation Guide
Steps
https://github.com/z-af
##1- Install GSM Modem: You need a GSM modem with working SIM card connected to zabbix server. I personally use
Wavecom that connects through USB port
##2- Install gammu & gammu-smsd Install gammu & gammu-smsd from repo or from source. I personally instelled latest
version (1.38.0) from source code with following commands:
#cd ~
#mkdir src
#cd src
#sudo yum group install 'Development Tools'
#wget https://cmake.org/files/v3.7/cmake-3.7.1.tar.gz
#tar zxvf cmake-3.7.1.tar.gz
#cd cmake-3.7.1
#./bootstrap --prefix=/usr
#gmake
#sudo gmake install
#export CMAKE_ROOT=/usr/share/cmake-3.7
#cd ..
#wget https://dl.cihar.com/gammu/releases/gammu-1.38.0.tar.gz
#tar zxvf gammu-1.38.0.tar.gz
#cd gammu-1.38.0
#./configure --prefix=/usr
#make
#sudo make install
##3- configure gammu configure gammu and make sure gammu detects your GSM Modem
#gammu-config
// generated by gammu-config
#cat ~/.gammurc
[gammu]
port = /dev/ttyUSB0
model =
connection = at115200
synchronizetime = yes
logfile =
logformat = nothing
use_locking =
gammuloc =
[smsd]
service = sql
driver = native_mysql
host = localhost
user = smsd
password = passw0rd
database = smsdb
debuglevel = 1
LogFile = /var/log/gammu/smsd.log
RunOnReceive = /opt/gammu/sms-parser.sh
InboxFormat = unicode
OutboxFormat = unicode
TransmitFormat = auto
##7 - execute scripts based on received sms command in this section we configure gammu-smsd to execute sms command
parser and execute script based on sms command. note that this parser is very trivial and provide some basic functionality. you
can change the parser and command scripts for more advanced actions.
cd /opt/gammu
cp sms-parser.sh a.sh pong.sh backup-fw.exp .
chmod +x *.*
// make sure the following line in /etc/gammu-smsdrc on step 5
RunOnReceive = /opt/gammu/sms-parser.sh
© 2020 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About