[op5-users] Configuration Guide for Nagios & Op5 (including NagVis, SMS Notification, etc..)

Russell Jennings russ at geekwhiz.com
Thu Sep 10 22:57:43 CEST 2009


I would like to mention, that you can (usually) send txt messages via  
e-mail. We do this on our nagios installs, such as sending to 16105553232 at vtext.com 
  to send a text message to that phone number on verizon. of course,  
you need to edit the command and all so it's shorter. here are some  
addresses (US):

AT&T: number at txt.att.net
Qwest: number at qwestmp.com
T-Mobile: number at tmomail.net
Verizon: number at vtext.com
Sprint: number at messaging.sprintpcs.com or number at pm.sprint.com
Virgin Mobile: number at vmobl.com
Nextel: number at messaging.nextel.com
Alltel: number at message.alltel.com
Metro PCS: number at mymetropcs.com
Powertel: number at ptel.com
Suncom: number at tms.suncom.com
U.S. Cellular: number at email.uscc.net
of course, if everything goes down, or even just your edge, you won't  
get notifications, so, there is still a benefit to using a cell.

Thanks,
Russell


On Sep 10, 2009, at 4:52 PM, Mirza Dedic wrote:

> I think that out of all these powerful packages being developed the  
> one issue that stands out is a detailed configuration guide that  
> binds some of the most powerful tools to work together.. Here is an  
> attempt to create such a guide..
>
> This guide assumes that you have Ubuntu 8.04 as the base OS with  
> Nagios as the user-ID logged in.
>
> Nagios 3.1.2                    # need user input
>
> Module Extensions:
> - Ninja                         # included / 09.10.09
> - Merlin                                # included / 09.10.09
> - NagVis                                # need user input
> - NaCoMa                                # need user input
> - Reports-Module                        # need user input
> - Reports-GUI                   # need user input
> - PNP4Nagios                    # included / 09.10.09
>
> Notification Extension:
> - SMS Notification              # included / 09.10.09
>
> Other:
> - Apache2 Configuration         # need user input
>
> //START
>
> **************
> MERLIN INSTALL
> **************
>
> # Download latest source (from /usr/local/nagios/addons)
> git clone git://git.op5.org/nagios/merlin.git merlin-src
>
> # Compile
> cd merlin-src
> make
>
> # Install
> ./install-merlin.sh --nagios-cfg=/etc/nagios/nagios.cfg
> --dest-dir=/etc/nagios/addons/merlin
>
> # Start the svc
> /etc/init.d/nagios restart
> /etc/init.d/merlind start
>
> **************
> NINJA INSTALL
> **************
>
> # Download latest source (from /usr/local/nagios/addons)
> git clone git://git.op5.org/nagios/ninja.git
>
> # Do this..
> mkdir ninja-gui
> cd ninja-gui/
> ln -s /usr/local/nagios/addons/ninja/op5build/index.php .
> ln -s /usr/local/nagios/addons/ninja/application .
>
> # Update the httpd config files
> Correct the path in: /etc/nagios/addons/ninja/op5build/ninja.httpd- 
> conf
>  Alias /ninja /usr/local/nagios/addons/ninja-gui/
>  <Directory "/usr/local/nagios/addons/ninja-gui/">
>
> # Do this..
> cd /etc/httpd/conf.d/
> ln -s /usr/local/nagios/addons/ninja/op5build/ninja.httpd-conf  
> ninja.conf
>
> # Restart Apache
> /etc/init.d/apache2 restart
>
> # Do this..
> Edit /usr/local/nagios/addons/ninja/op5build/index.php
>  $ninja_base = '/usr/local/nagios/addons/ninja';
>
> Edit /usr/local/nagios/addons/ninja/application/config/config.php
>  $config['nagios_base_path'] = '/etc/nagios';
>  $config['nagios_etc_path'] = '/etc/nagios';
>  $config['logos_path'] = '/nagios/images/logos/';
>  $config['pnp4nagios_path'] = false;
>
> # Import users into Ninja DB
> cd /usr/local/nagios/addons/ninja/install_scripts
> ./ninja_db_init.sh /usr/local/nagios/addons/ninja
> ./auth_import.php /usr/local/nagios/addons/ninja
>
> **************************
> SMS NOTIFICATION / GATEWAY
> **************************
>
> # Download the necessary libraries/software
> apt-get install gnokii
> apt-get install gsmlib
>
> # Enable cdc_amc support
> sudo modprobe cdc_acm
>
> # Plug your USB Phone (tested with KRZR K1) and check to see if its  
> detected
> lsusb
> root at van-nagios-new:~# lsusb
>
>        Bus 004 Device 008: ID 22b8:4902 Motorola PCS Triplet GSM  
> Phone (AT)
>        Bus 004 Device 002: ID 413c:a001 Dell Computer Corp. Hub
>        Bus 004 Device 001: ID 0000:0000
>        Bus 003 Device 001: ID 0000:0000
>        Bus 002 Device 001: ID 0000:0000
>        Bus 001 Device 001: ID 0000:0000
>
> # You need to make sure your phone is listed there in AT Mode, if it  
> is not AT Mode, you need to look in your phone settings and change  
> the USB connection from memory to phone because your computer might  
> detect it as a disk device instead of mobile.
>
> # Test a message to the phone..
>
> Gsmsendsms -d /dev/ttyACM0 0001112222 "message test"
>
> # You need to make sure that using the -d slash, you are pointing to  
> the correct device in /dev which would be your phone (could be  
> ttyUSB1 or something different)
>
> # Add the following to your commands.cfg for notifications, remember  
> to edit accordingly to match your /dev/ttyDEVICE
>
> define command{
> command_name notify-service-by-sms
> command_line /usr/bin/gsmsendsms -d /dev/ttyACM0 $CONTACTPAGER$  
> "Nagios  $NOTIFICATIONTYPE$ : $HOSTALIAS$/$SERVICEDESC$ is  
> $SERVICESTATE$ ($SERVICEOUTPUT$)"
> }
>
> define command{
> command_name notify-host-by-sms
> command_line /usr/bin/gsmsendsms -d /dev/ttyACM0 $CONTACTPAGER$  
> "Nagios  $NOTIFICATIONTYPE$ : Host $HOSTALIAS$ is $HOSTSTATE$  
> ($OUTPUT$)"
> }
>
> # Add the following to your contacts.cfg definition for each contact  
> that is to be notified by SMS
>
> service_notification_commands   notify-service-by-email,notify- 
> service-by-sms
> host_notification_commands              notify-host-by-email,notify- 
> host-by-sms
>
> *****************
> NINJA: PNP4Nagios
> *****************
>
> # edit /usr/local/nagios/addons/ninja/application/config/config.php
>
> $config['pnp4nagios_path'] = '/nagios/pnp/';
>
> $config['pnp4nagios_config_path'] = '/usr/local/nagios/etc/pnp/ 
> config.php';
>
> //END
> _______________________________________________
> op5-users mailing list
> op5-users at lists.op5.com
> http://lists.op5.com/mailman/listinfo/op5-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.op5.com/pipermail/op5-users/attachments/20090910/f9954f29/attachment.html 


More information about the op5-users mailing list