in my nagios setup, I have created some things myself using open source Java components.
What you need to do is:
Have SMS Server software, that is installed on the machine on which your modem is connected. You could use gsmlib ( jsmsengine.sourceforge.net/ ) for that purpose. For our purpose, we wrote a simple TCP-server using the jSMSEngine library to send message, so we could use telnet and a very simple protocol to send messages.
On your Nagios machine, have some software or script that can pass messages to the SMS server on the other machine. With jSMSServer that reads files from a directory you could use a simple ftp/nfs/smb copy script.
In our setup, we used a Beanshell script ( beanshell.org/ ) that connects over TCP to our SMS server.
You have to configure Nagios to use your script whenever notifications have to be sent.
In Nagios, you have to add an extra notification path, and that should be done like this:
‘notify-by-sms’ command definition
command_line java -Xmx16m -Xnoclassgc -noverify -cp /export/home/beanshell/lib/bsh-1.3.0.jar bsh.Interpreter /export/home/beanshell/script/send_ace.bsh $CONTACTPAGER$ “$SERVICEDESC$ - $HOSTNAME$ - $HOSTADDRESS$ - $SERVICESTATE$ - $OUTPUT$ - $DATETIME$” smsserver.myhost 6666
‘host-notify-by-sms’ command definition
command_line java -Xmx16m -Xnoclassgc -noverify -cp /export/home/beanshell/lib/bsh-1.3.0.jar bsh.Interpreter /export/home/beanshell/script/send_ace.bsh $CONTACTPAGER$ “Host ‘$HOSTALIAS$’ is $HOSTSTATE$ - Info: $OUTPUT$ - Time: $DATETIME$” smsserver.myhost 6666
And you refer to these commands in contacts.cfg:
‘Nightly support’ contact definition
alias Nightly Support
So, this is not a complete solution, although if you’re skilled in Java very easy to build. Probably there are other ( and maybe better ) solutions, but this one did it for us and has acted flawlessly for the pas months.