We use the following script to send and do some basic logging (was for trouble shooting) You would need to change the device to whatever device your modem is recognised as.
This script is called from submit_sms.sh which pulls all the correct variables etc from Opsview. Hope it helps! Steve #!/bin/bash DATE=`date` echo "$DATE - Number: $1 Message: $2 " >> /tmp/nagios_monitor_sms.log chat '' AT OK AT+CMGF=1 OK AT+CMGS=\"$1\" ">" "$2" OK '' >/dev/ttyUSB2 </dev/ttyUSB2 -----Original Message----- From: opsview-users-boun...@lists.opsview.org on behalf of Didier Roels Sent: Tue 4/20/2010 19:09 To: Opsview Users Subject: [opsview-users] SMS Alerts on Centos 5.4 Hi everybody, I'm running Opsview on a Centos 5.4 server and I would like to send alerts with an sms modem. I currently have a 'Huawei E220' modem attached to the system. I'm able to connect to the internet with the device, so I know Linux recognizes it and is able to work with it. Now I was wondering what kind of tool/script is able to connect with this? How am I able to send SMS alerts through a command line ? Any assistance would be greatly appreciated. Thanks, Didier Roels
We use the following script to send and do some basic logging (was for trouble shooting) You would need to change the device to whatever device your modem is recognised as. This script is called from submit_sms.sh which pulls all the correct variables etc from Opsview. Hope it helps! Steve #!/bin/bash DATE=`date` echo "$DATE - Number: $1 Message: $2 " >> /tmp/nagios_monitor_sms.log chat '' AT OK AT+CMGF=1 OK AT+CMGS=\"$1\" ">" "$2" OK '' >/dev/ttyUSB2 </dev/ttyUSB2 -----Original Message----- From: opsview-users-boun...@lists.opsview.org on behalf of Didier Roels Sent: Tue 4/20/2010 19:09 To: Opsview Users Subject: [opsview-users] SMS Alerts on Centos 5.4 Hi everybody, I'm running Opsview on a Centos 5.4 server and I would like to send alerts with an sms modem. I currently have a 'Huawei E220' modem attached to the system. I'm able to connect to the internet with the device, so I know Linux recognizes it and is able to work with it. Now I was wondering what kind of tool/script is able to connect with this? How am I able to send SMS alerts through a command line ? Any assistance would be greatly appreciated. Thanks, Didier Roels
_______________________________________________ Opsview-users mailing list Opsview-users@lists.opsview.org http://lists.opsview.org/lists/listinfo/opsview-users