Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

HOWTO send SMS via modem with Zenoss

VERSION 7  Click to view document history
Created on: Mar 9, 2010 8:45 AM by phonegi - Last Modified:  Apr 20, 2010 3:23 PM by phonegi

SUMMARY

 

The alerting mechanism for a typical Zenoss system relys on the very network that Zenoss is monitoring. But what happens if some part of the alerting mechanism goes down? Wouldn't it be better for the alerting mechanism to bypass the network and originate directly from Zenoss? This can be accomplished with a modem, phone line, and TAP connection into a provider's network. I must give a shout out to prisoner881 who got me working on this because of the issues raised in this thread.

 

The following instructions document my installation and implementation of QuickPage on a CentOS Zenoss installation.

 

QUICKPAGE INSTALLATION

 

  1. SSH into your Zenoss system. Login as root.
  2. Download and unzip QuickPage:
    # cd /tmp
    # wget http://qpage.org/download/qpage-3.3.tar.Z
    # tar -xzf qpage-3.3.tar.Z
  3. Customize QuickPage installation configuration. By default, the configuration file is /etc/qpage.cf. I changed it to be more consistent with other CentOS programs by renaming the file /etc/qpage.conf. Also, by default, QuickPage changes to the daemon user even if excuted as root. This causes some issues since the daemon user does not have write access to the /var/lock directory or /dev/ttyS[x]. You can customize your system however you want, but I found it easiest to change the configuration so that QuickPage runs as root.
    # cd qpage-3.3
    # nano config.input
    Change QPAGE_CONFIG="/etc/qpage.cf" to "/etc/qpage.conf"
    Change DAEMON_USER="daemon" to DAEMON_USER="root"
    Save the file. Ctrl-X followed by y<ENTER>
  4. Install QuickPage.
    # ./configure
    # make
    # make install

 

QUICKPAGE CONFIGURATION

 

I have included a basic configuration file that you will need to complete. You can download it and use it as a template. Read it along with man qpage or the qpage.man.html.zip document that is attached below. Follow these steps to download and install the template to get you started.

 

# cd /etc

# wget servlet/JiveServlet/download/5819-1-2537/qpage.conf.gz

# gunzip qpage.conf.gz

 

My template defines a modem connected to COM1 at /dev/ttyS0. (You will want to make sure your modem returns verbal commands. I just set my External Courier V.Everything modem to factory defaults and everything worked fine.) It defines two TAP service providers: att and nextel. (Use the TAP phone number resources at the bottom of this document to find the phone numbers of your service providers.) It then defines pagers, which are individual accounts.

 

IMPORTANT: The name of the pager accounts defined in qpage.conf MUST EXACTLY MATCH the Pager field of the Zenoss Users that will be sending alerts via qpage. For instance, you may have a Zenoss User user named jack_qpage whose Pager field is defined as jack_8005551212. The pager account you configure in qpage.conf must be named jack_8005551212 in order for Zenoss to interface properly with qpage.

 

I recommend starting with just one provider and one pager account in your qpage.conf file. Test the pager account with the following command. Once you get it working, add all the other pager accounts that will use

 

# qpage -dip [pager] [message]

 

The -d option will run qpage in debug mode so you can watch each step of the transaction. This is necessary to determine if the TAP phone number you are using is functional and if the provider is accepting/rejecting the pager account number you specified. I had to try lots of numbers before I found ones that worked.

 

The -i option simply runs qpage right away and does not write the message into the queue.

 

[pager] is the name of one of the pager accounts your created in your qpage.conf file.

 

[message] is simply a test message like "qpage test message".

 

Repeat the above test for each pager account you define in the qpage.conf file. Once you've got them working, you've finished the hard part.

 

QUICKPAGE DAEMON CONFIGURATION

 

  1. Download and install the daemon script (installs automatically to /etc/init.d)
    # cd /tmp
    # wget servlet/JiveServlet/download/5819-1-2532/qpaged.daemon.zip

    # unzip qpaged.daemon.zip (unzips to /etc/init.d)
  2. Download the damon script configuration file. By default, the qpage daemon checks the queue every 5 seconds. To change this setting, edit the /etc/sysconfig/qpaged file. Uncomment and change the DAEMON_PARAM variable as specified in the comments of the file.
    # wget http://community.zenoss.org/servlet/JiveServlet/download/5819-1-2533/qpaged.daemon.conf.zip
    # unzip qpaged.daemon.conf.zip (unzips to /etc/sysconfig)
  3. Configure the script to start at boot up
    # chkconfig --add qpaged
  4. Start the daemon
    # service qpaged start

CONFIGURE ZENOSS TO USE QUICKPAGE

 

  1. Become the zenoss user.
    # su - zenoss
  2. Download the script and configuration file that Zenoss will use to execute QuickPage
    $ cd $ZENHOME/bin
    $ wget http://
    community.zenoss.org/servlet/JiveServlet/download/5819-5-2544/sendqpage.sh.gz
    $ gunzip sendqpage.sh.gz
    $ chmod uog+x sendqpage.sh
    $ cd $ZENHOME/etc
    $ wget servlet/JiveServlet/download/5819-2-2542/sendpage.conf.gz
    $ gunzip sendqpage.conf.gz

    $ chmod uog+x sendqpage.conf

  3. [OPTIONAL] Edit $ZENHOME/etc/sendqpage.conf to customize settings for your system.
  4. Configure Zenoss to use the new script. Go to Settings. Change the Page Command setting to $ZENHOME/bin/sendqpage.sh
  5. Create/configure Zenoss Users to use QuickPage pager accounts by setting the Pager field of a Zenoss User to the name of one of the pager accounts you defined in /etc/qpage.conf. Click Save and then click the Test link to try it out.

 

REFERENCES

 

QuickPage homepage: http://qpage.org/

sendPage homepage: http://www.sendpage.org/

Nagios example that got me on the right track: http://www.dynowski.com/blog/?p=62

 

TAP phone number resources:

http://avtech.com/Support/TAP/index.htm

http://www.notepage.net/tap-phone-numbers.htm

http://www.inforad.com/techsupport/help%20center/index.php?idx=2&lstMenu=Services%20and%20Receivers&searchtxt=TAP

Attachments:
Note: binary attachments ending in .zip will need to be unzipped before use.
Comments (0)