Hi again
one of my last adventures with Zabbix is the alerts by SMS. I know there are some info on forum and wiki. I have tested all ways. Only script that worked for my was using smssend binary and Clickatell SMS Gateway service.
I can tell that my service is working currently, almost, when I have executed it on console.
But...unfortuneatly for me, don't work when Zabbix call script. I have followed the steps to make a script:
1. On zabbix_server.conf I have:
2. I have created the script:
3. cat /home/zabbix/bin/sms.sh
4. I have created a new Media Type and the action on one host, when a trigger has a problem, action send a message to Admin. One is the SMS. ... but
5. On Zabbix_server.log I have noticed the next error:
6. /home/zabbix/bin is owned by zabbix user and has 777 on every level....
7. When I run script on console, it works!
So I have to get Zabbix run sms.sh without no errors to get sms send to users.
One more time, every help will be great
Thanks!
PS:
8. I check the script on other way and it also works
one of my last adventures with Zabbix is the alerts by SMS. I know there are some info on forum and wiki. I have tested all ways. Only script that worked for my was using smssend binary and Clickatell SMS Gateway service.
I can tell that my service is working currently, almost, when I have executed it on console.
But...unfortuneatly for me, don't work when Zabbix call script. I have followed the steps to make a script:
1. On zabbix_server.conf I have:
Code:
# Location for custom alert scripts AlertScriptsPath=/home/zabbix/bin
Code:
-bash-3.2# ls -ls /home/zabbix/bin/ total 28 4 -rwxrwxrwx 1 zabbix zabbix 484 Jun 4 15:55 sms.sh
Code:
#!/bin/bash # Script to send SMS messages from Zabbix # $1 is the phone number, $2 is the subject and $3 is the message # \0A is a hexadecimal code that gives a CR to your cell phone message /usr/local/bin/smssend clickatell.sms USER PASSWORD API_ID API_NAME $1 "$2\0A\0A$3"
5. On Zabbix_server.log I have noticed the next error:
Code:
5548:20090604:165807 Error executing [/home/zabbix/bin/sms.sh] [Permission denied]
7. When I run script on console, it works!
So I have to get Zabbix run sms.sh without no errors to get sms send to users.One more time, every help will be great

Thanks!
PS:
8. I check the script on other way and it also works
-bash-3.2# sms.sh NUMBER_OF_CELL hello hello


Comment