I would like to reopen the subject. I use Zabbix 1.1.1
I saw the possibility to use smssend + clickatell ans I did try smssend clickatell -install but did not work, it tried to connect to planet-d.net:80, but all the tries were looping.
I tried to use Media type Script with the PHP clickatell SMS class from http://sourceforge.net/projects/sms-api/ as following:
- I defined Media Type Script - > send_sms.sh
#!/bin/bash
/usr/bin/php -f /home/zabbix/bin/send_sms_php.php $1 $2 $3
- I defined Configurations -> Users -> Media (Send To: +phonenumberwithcountrycode)
send_sms_php.php
#!/usr/bin/php
<?php
require_once ("/home/zabbix/bin/sms_api.php"); -- this is from sourceforge
$mysms = new sms();
echo $mysms->session;
echo $mysms->getbalance();
$tel=$argv[1];
$sub=$argv[2];
$mess=$argv[3];
$mysms->send ($tel,$sub,$mess);
?>
But it didn't work, although Monitoring -> Actions said "Sent"
I did succed to send SMS directly from console using the above scripts as:
./send_sms.sh phonenumber subject message
I would appreciate any help,
Thank you.
I saw the possibility to use smssend + clickatell ans I did try smssend clickatell -install but did not work, it tried to connect to planet-d.net:80, but all the tries were looping.
I tried to use Media type Script with the PHP clickatell SMS class from http://sourceforge.net/projects/sms-api/ as following:
- I defined Media Type Script - > send_sms.sh
#!/bin/bash
/usr/bin/php -f /home/zabbix/bin/send_sms_php.php $1 $2 $3
- I defined Configurations -> Users -> Media (Send To: +phonenumberwithcountrycode)
send_sms_php.php
#!/usr/bin/php
<?php
require_once ("/home/zabbix/bin/sms_api.php"); -- this is from sourceforge
$mysms = new sms();
echo $mysms->session;
echo $mysms->getbalance();
$tel=$argv[1];
$sub=$argv[2];
$mess=$argv[3];
$mysms->send ($tel,$sub,$mess);
?>
But it didn't work, although Monitoring -> Actions said "Sent"
I did succed to send SMS directly from console using the above scripts as:
./send_sms.sh phonenumber subject message
I would appreciate any help,
Thank you.
Comment