Daniele Duca
BOFH excuse for today:  The keyboard isn't plugged in
Server date is: 18/6/2024

This site best viewed with eyes

Say NO to software patents!

07/02/05 - Release 0.2
03/02/05 - Release 0.1

Notes about the 0.2 release.
I rewrote the plugin because I found some bugs in the bash script version.. if you downloaded it, don't use it. It will waste all your SMS :)

I like so much mon, because it is very customizable and powerful. I wrote this little plugin to help whoever has a Vola.it SMS account and want to be warned through this of events triggered by mon.

  1. HTTP::Lite perl module
  2. mon
  3. a Vola.it account
  1. Since Vola.it is an italian SMS provider and I have an italian mobile phone, I can currently receive SMS without problems. I don't know if it will work also for non italian mobiles, but probably every country has a similar provider, just look around for it. The changes you should make to the script should not be too much difficult.
Installation instructions:

Download the volasms.alert script to the directory where the other alerts reside. If you followed the default installation, the directory should be /usr/lib/mon/alert.d
Edit it and change the VOLAUID and VOLAPASS variables to fit your account
Make the script executable and create the log file. Don't forget to change logfile's ownership to the user that runs mon.

# chmod +x /usr/lib/mon/alert.d/volasms.alert
# touch /var/log/sms.warn.log
# chown monuser /var/log/sms.warn.log

Check if the alert script works

# /usr/lib/mon/alert.d/volasms.alert

If the script just hangs, it's ok. If it complains something like

# /usr/lib/mon/alert.d/volasms.alert
Can't locate HTTP/Lite.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/local/apache2/htdocs/files/volasms.alert line 23.
BEGIN failed--compilation aborted at /usr/local/apache2/htdocs/files/volasms.alert line 23.

then you'll need to install the HTTP:Lite module. Just type

# perl -MCPAN -e 'install HTTP::Lite'

and you should be ok.

The last thing to do is to modify the mon configuration file to let it use this plugin, here follows an example:

.. mon.cf
period wd {Sun-Sat}
       alert volasms.alert your-mobile-phone
       alert volasms.alert another-mobile-phone
       alertafter 2
       numalerts 1
.. mon.cf

This means "warn one time your-mobile-phone and another-mobile-phone whenever the check fails for 2 consequent times". Please refer to the mon manual page for mon configuration file syntax.

Nothing else to do :) I hope this will help you. As usual, any feedback is appreciated.


No liability for the contents of this document can be accepted. Use the concepts, examples and other content at your own risk. There may be errors and inaccuracies that may damage your system. Proceed with caution, and although this is highly unlikely, the author does not and can not take any responsibility for any damage to your system that may occur as a direct or indirect result of information that is contained within this document. You are strongly recommended to make a backup of your system before proceed and adhere to the practice of backing up at regular intervals.

Informations on this page are released under the GNU FDL License
This page last updated: 07/02/05