Hello Again,
i try to send zabbix-alerts by sms.
I've installed a WebStick into my zabbix system. i can send sms by using gammu from shell.
I've placed a script 'smsgammu.sh' into /usr/local/share/zabbix/alertscripts
Then i made the script executable. After that test the Script with the user 'zabbix'.
From Shell everything works fine. The sms was sent to me an the log entry was written.
Then i configured the 'smsgammu.sh'-Script an new media type in zabbix administration.
But no sms where sent out of zabbix! And no log entry was made.
Where is the problem?
I've seen that many users have problems mit alertscripts. Is there any log for the alertscripts actions?
best regards
Dirk
i try to send zabbix-alerts by sms.
I've installed a WebStick into my zabbix system. i can send sms by using gammu from shell.
I've placed a script 'smsgammu.sh' into /usr/local/share/zabbix/alertscripts
Code:
#!/bin/sh
HOME=/etc
PATH=/bin:/sbin:/usr/bin:/usr/sbin
LOGFILE="/var/log/zabbix/zabbix-sms.log"
echo "Recipient='$1' Message='$3'" >> ${LOGFILE}
MOBILE_NUMBER=`echo "$1" | sed s#\s##`
# Log it
echo "echo $3 | /usr/bin/sudo /usr/bin/gammu --sendsms TEXT ${MOBILE_NUMBER}" >>${LOGFILE}
# Send it
echo "$3" | /usr/bin/sudo /usr/bin/gammu --sendsms TEXT "${MOBILE_NUMBER}" 1>>${LOGFILE} 2>&1
# EOF
From Shell everything works fine. The sms was sent to me an the log entry was written.
Then i configured the 'smsgammu.sh'-Script an new media type in zabbix administration.
But no sms where sent out of zabbix! And no log entry was made.
Where is the problem?
I've seen that many users have problems mit alertscripts. Is there any log for the alertscripts actions?
best regards
Dirk
Comment