Re: Nagios SMS Alert Using gnokii tool due t o failure of "gammu & wammu" tools - CentOS 5.6 i386 platform

790 views
Skip to first unread message

Nishith Vyas

unread,
Jan 11, 2012, 8:57:22 AM1/11/12
to vglug
Hello,

Just i have successfully configured "gnokii" tool & able to send sms. Below are the steps. I have used "Sony Ericsson W810i, connected with USB on CentOS 5.6 i386 OS platform"

Step:1
yum install gnokii

Step:2
After installation, edit /etc/gnokiirc file & make below changes.

port = /dev/ttyACM0     ---> tail -f /var/log/messages command is showing my mobile on /dev/ttyACM0
model = AT
initlength = default
connection = serial
use_locking = no
serial_baudrate = 19200
bindir = /usr/sbin/

Step:3
execute "gnokii --identify" command to get output of your configured mobile phone. Please check below lines for more information.

Received message type 06
IMEI         : <Your Mobile IMEI Number>
Manufacturer : Sony Ericsson
No flags section in the config file.
Model        : Sony Ericsson W810
Product name : Sony Ericsson W810
Revision     : R4EA031  R4EA031
Serial device: closing device

Step:4
Use below command to send SMS

SYNTAX : echo "Your Message" | gnokii --sendsms <mobile number>

Example : echo "This is a Test SMS" | gnokii --sendsms 9879597301

That's it.

Now, My next stage is to configure this SMS Service with Nagios to get SMS Alerts automatically. Please guide me if someone is having expertise in this utility.



Advance Thanks,
Nishith N.Vyas




On Wed, Jan 11, 2012 at 6:45 PM, Nishith Vyas <nishit...@gmail.com> wrote:
Hello Linux Experts,

Stage:1
Since today morning, I am trying to install gnokii & gsm-utils tool, as I am unable to install "gammu" utility on CentOS 5.6 i386. During installation of "gammu", i am getting below error which i am unable to resolve since 6 hours.

################################################################################
Error: Missing Dependency: libc.so.6(GLIBC_2.7) is needed by package gammu-1.31.0-2.1.i386 (home_Nijel)
Error: Missing Dependency: libgudev-1.0.so.0 is needed by package gammu-1.31.0-2.1.i386 (home_Nijel)
Error: Missing Dependency: libcurl.so.4 is needed by package gammu-1.31.0-2.1.i386 (home_Nijel)
Error: Missing Dependency: libc.so.6(GLIBC_2.7) is needed by package libGammu7-1.31.0-2.1.i386 (home_Nijel)
Error: Missing Dependency: libc.so.6(GLIBC_2.8) is needed by package libusb1-0-1.0.8_1.0.9rc3-42.1.i386 (home_Nijel)
Error: Missing Dependency: libbluetooth.so.3 is needed by package libGammu7-1.31.0-2.1.i386 (home_Nijel)
Error: Missing Dependency: libbluetooth.so.3 is needed by package gammu-1.31.0-2.1.i386 (home_Nijel)
################################################################################

Stage:2
/etc/yum.repos.d/gammu.repo having below entires.

[home_Nijel]
name=Gammu and Wammu packages (CentOS_CentOS-6)
type=rpm-md
baseurl=http://download.opensuse.org/repositories/home:/Nijel/CentOS_CentOS-6/
gpgcheck=1
gpgkey=http://download.opensuse.org/repositories/home:/Nijel/CentOS_CentOS-6/repodata/repomd.xml.key
enabled=1

Stage:3
"rpm -qa | grep glibc" is giving below output.

glibc-devel-2.5-65.el5_7.1
glibc-utils-2.5-65.el5_7.1
glibc-common-2.5-65.el5_7.1
glibc-2.5-65.el5_7.1
glibc-headers-2.5-65.el5_7.1

Stage:4
I tried a lot to upgrade glibc package to install gammu,but having failure. Thus, I am trying to install "gnokii" & "gsm-utils" tool to send TEST sms. I am using "Sony Ericsson W810i" mobile phone & below is the kernel message while inserting the phone into USB port.

Jan 11 18:11:49 station1 kernel: usb 4-2: new full speed USB device using uhci_hcd and address 2
Jan 11 18:11:49 station1 kernel: usb 4-2: configuration #1 chosen from 1 choice
Jan 11 18:11:50 station1 kernel: cdc_acm 4-2:1.1: ttyACM0: USB ACM device
Jan 11 18:11:50 station1 kernel: cdc_acm 4-2:1.3: ttyACM1: USB ACM device
Jan 11 18:11:50 station1 kernel: usbcore: registered new driver cdc_acm
Jan 11 18:11:50 station1 kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters

Stage:5

Now, I am following below URL to install "gnokii & gsm-utils". But, I am unable to find "gsm-utils" package using yum.

The Link is :- http://securfox.wordpress.com/2009/03/30/how-to-configure-nagios-to-send-sms-to-your-mobile/

The error which i am getting is,

Stage:6
yum install gsm-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.vr-zone.com
 * epel: mirror01.idc.hinet.net
 * extras: centos.vr-zone.com
 * livna: ftp-stud.fht-esslingen.de
 * rpmforge: apt.sw.be
 * updates: centos.vr-zone.com
Setting up Install Process
No package gsm-utils available.
Nothing to do

Please help me to install any of the above mentioed utility to implement SMS Alret using the GSM Mobile Phone.



With Best Regards,
Nishith N.Vyas



Nishith Vyas

unread,
Jan 11, 2012, 8:15:01 AM1/11/12
to vglug

Nishith Vyas

unread,
Jan 13, 2012, 6:33:12 AM1/13/12
to vglug
Hello Friends,

I have tested SMS Alert Using Nagios 3.3.1 successfully on CentOS 5.7 i386 platform. Below is the SUM UP of used tools.

Nagios Core = 3.3.1
Nagios Plugin = 1.4.15
gnokii = 0.6.30-1.el5
Modem Used = Micromax MMX610U USB Modem (Pen Drive Sized)
Mobile Used = Sony Ericsson w810i & w200i

Now, my NMS (Network Management System) can send SMS if certain HOST & Service is Down. Also It is possible to get HOST & Service OK Message after it's DOWN state. Using this method, anyone can easily calculate "downtime" for a particular service & host !!!!!!!!!!!!





Regards,
Nishith N.Vyas

Vishal Joshi

unread,
Jan 12, 2012, 1:44:13 AM1/12/12
to vg...@googlegroups.com

Nishith bhai, waiting eagerly for your updates :)

 

Advance Thanks,
Nishith N.Vyas
--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG

Nishith Vyas

unread,
Jan 18, 2012, 6:03:40 AM1/18/12
to vg...@googlegroups.com
Configured "gnokii" with Nagios version 3.3 successfully.

-Nishith N.Vyas

Nirmal Pathak

unread,
Jan 19, 2012, 8:02:15 AM1/19/12
to vg...@googlegroups.com
On 18 January 2012 16:33, Nishith Vyas <nishit...@gmail.com> wrote:
> Configured "gnokii" with Nagios version 3.3 successfully.

I would suggest to make a complete "How To" document & put up in your
blog or on VGLUG!

Good Work!

Have FuN!
--
Nirmal D Pathak.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What I want is freedom, not life, nor pleasure, nor good!
FOSS gives that.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply all
Reply to author
Forward
0 new messages