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 who got me working on this because of the issues raised in .
The following instructions document my installation and implementation of QuickPage on a CentOS Zenoss installation.
- SSH into your Zenoss system. Login as root.
- Download and unzip QuickPage:
# cd /tmp
# tar -xzf qpage-3.3.tar.Z
- 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>
- Install QuickPage.
# make install
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
# 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
- Download and install the daemon script (installs automatically to /etc/init.d)
# cd /tmp
# wget http://community.zenoss.org/servlet/JiveServlet/download/5819-1-2532/qpaged.daemon.zip
# unzip qpaged.daemon.zip (unzips to /etc/init.d)
- 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)
- Configure the script to start at boot up
# chkconfig --add qpaged
- Start the daemon
# service qpaged start
CONFIGURE ZENOSS TO USE QUICKPAGE
- Become the zenoss user.
# su - zenoss
- 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 http://community.zenoss.org/servlet/JiveServlet/download/5819-2-2542/sendpage.conf.gz
$ gunzip sendqpage.conf.gz
$ chmod uog+x sendqpage.conf
- [OPTIONAL] Edit $ZENHOME/etc/sendqpage.conf to customize settings for your system.
- Configure Zenoss to use the new script. Go to Settings. Change the Page Command setting to $ZENHOME/bin/sendqpage.sh
- 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.
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: