Gnokii SMS

Gnokii SMS

Gnokii é um conjunto de ferramentas que permitem várias operações em celulares e modens GSM. Entre elas o envio de SMS para uso de notificações.



yum install gnokii


apt-get install gnokii

Configuração: vim /etc/gnokiirc

 port = /dev/ttyACM0
 model = AT
 initlength = default
 connection = serial
 serial_baudrate = 19200
 2 smsc_timeout = 10
 allow_breakage = 0
 bindir = /usr/sbin/
 debug = on
 rlpdebug = off
 xdebug = off

Teste :

[root@r2d2 etc]# gnokii --identify
GNOKII Version 0.6.19
IMEI         : 356019013673843
Manufacturer : Sony Ericsson
Model        : AAC-1052021-BV
Product name : AAC-1052021-BV
Revision     : R1KG001 070418 2238


[root@r2d2 etc]# echo "teste" | gnokii --sendsms 881205xx
GNOKII Version 0.6.19
Send succeeded!

Gnokii + Nagios

#Nagios command obj
# 'host-notify-by-gnokii' command definition
define command{
command_name host-notify-by-gnokii
command_line /opt/nagios/bin/sms_notification_by_gnokki $CONTACTPAGER$ "Nagios Host Alert nn $HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$"

send sms example script:

# Gnokii Plugin script
# (c) Horst venzke
# v 0.1 - 17.01.2004

echo $mess | gnokii --sendsms $number

3 thoughts on “Gnokii SMS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s