nagios - gnokii

Jonas Kalliokoski jontte at home.se
Sat Aug 23 01:17:58 CEST 2003


ahh...after litle more work I find this ..

From: Giulius 
To: <EMAIL: PROTECTED>,
<EMAIL: PROTECTED>
Subject: [netsaint] HOW TO USE SMS NOTIFICATION + GNOKII

This is a little HOWTO that help who try to run gnokii with netsaint on 
unix systems for sms notification:



TO use gnokii with netasint you "must" know 3 things:

1)Netsaint cannot understand any replay output/error given by gnokii;
2)Netsaint user (process owner) must have the ability to read/write on 
the serial (or any other device like irda) connected to the gsm sender
3)Netsaint user (process owner) must read/write on lock directory


1) add this command to netsaint host.cfg
command[sms]=/path/to/printf "MESSAGE+VARIABLE" | /path/to/gnokii 
--sendsms [gsm number] -C0 2>/dev/null
add olso the contact information about sms like this:
contact[netsaint]=Netsaint 
User;24x7;24x7;1;1;1;1;1;1;notify-by-email,notify-by-epager,notify-by-sms;
host-notify-by-email,host-notify-by-epager,host-notify-by-sms;netsaint;netsaint

Remember:
if you forget to add "2>/dev/null" on the end of the command line, 
the result was a broken pipe and netsaint
cannot go over, freezing all the netsaint process.

2)Remember to set permission RW on serial (or any other device like 
irda) device to user netsaint (or process owner). This to permit
Read Write on device attached to gsm cel.
There are differently method to do this based on type of unix you own.
You must find this on yourself.

3)Now you must configure gnokii in order to use lock files (to avoid 
conflict with other devices that use serial/usb).
On gnokii/etc directory un can find a file called gnokiirc.
Make sure that contain this:

port = /dev/ (device attached to gsm)
model = (the model number of your nokia gsm like 6210)
connection = serial (or you connection to gsm cel. like irda, ecc.)
use_locking = yes

Now you are ready to receive sms about notification of netsaint.


Bye.
Giulius.

So there was not so big thing to get it working with nagios :)

Thanks Giulius !!!!

/Jonas
  ----- Original Message ----- 
  From: Jonas Kalliokoski 
  To: nagios-users at lists.sourceforge.net 
  Sent: Friday, August 22, 2003 10:47 PM
  Subject: [Nagios-users] nagios - gnokii


  Hi!

  Now I have read all information I could find and test my system a couple of days but it´s one problem I can´t find any help for.
  how should the misccommands.cfg and contacts.cfg look like if the gnokii will work nice with nagios.

  I can send sms through the command: /usr/bin/printf "TEXT" | /usr/bin/gnokii --sendsms xxxxxxxxxx -C0

  Please anyone !

  /Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030823/7645b40e/attachment.html>


More information about the Users mailing list