Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

SMS Server Tools 3 via cellular (USB)-dongle

When I installed my Nemslinux on the Raspi3, I had one main goal as a target: Monitoring my internet-connection, and sending SMS if it breaks down, obviously as it's the only communication back left in my home.
I thought about a separate UMTS/LTE-connection that the usb-dongle could also provide, but that would need a corresponding hosted monitoring service plus UMTS data - that surely will cost extra money, that I was not willing to pay.

The SMS-Server-Tools 3 are easy to install on NEMSlinux, a bit more difficult was it to configure the smstools to communicate with the dongle and to fiddle with the ttyusb0-comport always changing its ID on reboot, causing loss of communication. That was done by mapping the device-id to a symlink.

You will have to give the nagios-user permissions to create files under /var/spool/sms inherited, I just chose 777 for easygoing..

Then you would add two misccommand in nconf:


/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$ \nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:$LONGDATETIME$\n" | /usr/local/bin/sendsms $CONTACTPAGER$ "** $NOTIFICATIONTYPE$ Host Alert:$HOSTNAME$ is $HOSTSTATE$ **"


/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$ \nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:$LONGDATETIME$\n" | /usr/local/bin/sendsms $CONTACTPAGER$ "** $NOTIFICATIONTYPE$ Service Alert:$SERVICEDESC$ on $HOSTNAME$ State: $SERVICESTATE$ **"

and then configuring your contact with the new notify-command and adding a phone-nr in the format +49170123465

That's it, I still have to find out, how  I check for a failed internet connection, I think about pinging three individual internet-ip-adresses, and when ALL three fail, trigger a "Internet-down-SMS". (if interconnecting switch not down, if router not down, if DSL-Modem not down, keeping a proper parenting dependency. Still have to properly implement that, but it's cool not to be dependant on a running internet line for that monitoring-notifications to work.

It would also be a good idea to put this into the standard NEMSlinux wouldn't it?
Messages In This Thread
SMS Server Tools 3 via cellular (USB)-dongle - by donald24 - 03-16-2019, 12:17 PM
RE: SMS Server Tools 3 via cellular (USB)-dongle - by Robbie Ferguson - 03-18-2019, 03:04 PM
RE: SMS Server Tools 3 via cellular (USB)-dongle - by donald24 - 03-18-2019, 05:44 PM
Forum Jump:

Users browsing this thread: 1 Guest(s)