gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Alerts through Nagios very temperamental


From: Andrew Thompson
Subject: RE: Alerts through Nagios very temperamental
Date: Thu, 22 Dec 2011 11:19:28 +0000

Thanks Michael for the suggestion…….

 

I have installed MYSQL and SMSD for MYSQL this morning.

 

I have added the table into the db by using this command

 

mysql -u root Nagios_text_db < /usr/share/doc/gnokii-smsd-mysql/sms.tables.mysql.sql

 

In my db I now have an Inbox/ Outbox and multipartinbox tables.

 

I then tried to run this command to start the smsd

 

/usr/sbin/smsd -u root -p rootpasswd -d Nagios_text_db -c 127.0.0.1 -m mysql -f /home/nagios/Desktop/smsd.log
 
But it gets in a continuous loop that ends in
 
Lowlevel.c:435 error 8. Unknown error – well better than nothing!!
Too many consecutive errors, restarting connection
 
Then starts up again
 

Serial device: closing device
Opened configuration file /home/ftladmin/.config/gnokii/config
Opened configuration file from memory
Added new section global
Adding key/value port//dev/ttyACM0
Adding key/value model/fake
Adding key/value model/AT
Adding key/value initlength/default
Adding key/value connection/serial
Adding key/value use_locking/yes
Adding key/value serial_baudrate/19200
Adding key/value smsc_timeout/10
Added new section xgnokii
Adding key/value allow_breakage/0
Added new section gnokiid
Adding key/value bindir//usr/local/sbin/
Added new section connect_script
Adding key/value TELEPHONE/12345678
Added new section disconnect_script
Added new section logging
Adding key/value debug/on
Adding key/value rlpdebug/off
Adding key/value xdebug/off
Added new section phone_fake
Adding key/value port/foobar
Adding key/value model/fake
Adding key/value connection/serial
Added new section fake_driver
Adding key/value sms_inbox//tmp/sms
LOG: debug mask is 0x1
Config read from file /home/ftladmin/.config/gnokii/config.
phone instance config:
model = AT
port = /dev/ttyACM0
connection = serial
initlength = default
serial_baudrate = 19200
serial_write_usleep = -1
handshake = software
require_dcd = 0
smsc_timeout = 10
rfcomm_channel = 0
sm_retry = 0
Initializing AT capable mobile phone ...
Serial device: opening device /dev/ttyACM0
Serial device: setting RTS to high and DTR to high
Message sent: 0x00 / 0x0004
41 54 5a 0d                                     | ATZ            
write: [ATZ<cr>]
read : [ATZ<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x000a
02 41 54 5a 0d 0d 0a 4f 4b 0d                   |  ATZ   OK      
Received message type 00
Message sent: 0x00 / 0x0005
41 54 45 31 0d                                  | ATE1           
write: [ATE1<cr>]
read : [ATE1<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x000b
02 41 54 45 31 0d 0d 0a 4f 4b 0d                |  ATE1   OK     
Received message type 00
Message sent: 0x00 / 0x000a
41 54 2b 43 4d 45 45 3d 31 0d                   | AT+CMEE=1      
write: [AT+CMEE=1<cr>]
read : [AT+CMEE=1<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x0010
02 41 54 2b 43 4d 45 45 3d 31 0d 0d 0a 4f 4b 0d |  AT+CMEE=1   OK
Received message type 00
Message sent: 0x06 / 0x0007
41 54 2b 47 4d 4d 0d                            | AT+GMM         
write: [AT+GMM<cr>]
read : [AT+GMM<cr><cr><lf>Nokia 6301<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x001b
02 41 54 2b 47 4d 4d 0d 0d 0a 4e 6f 6b 69 61 20 |  AT+GMM   Nokia
36 33 30 31 0d 0a 0d 0a 4f 4b 0d                | 6301    OK     
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 49 0d                         | AT+CGMI        
write: [AT+CGMI<cr>]
read : [AT+CGMI<cr><cr><lf>Nokia<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0017
02 41 54 2b 43 47 4d 49 0d 0d 0a 4e 6f 6b 69 61 |  AT+CGMI   Nokia
0d 0a 0d 0a 4f 4b 0d                            |     OK         
Received message type 06
Message sent: 0x63 / 0x0009
41 54 2b 43 53 43 53 3f 0d                      | AT+CSCS?       
write: [AT+CSCS?<cr>]
read : [AT+CSCS?<cr><cr><lf>+CSCS: "PCCP437"<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x63 / 0x0023
02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 |  AT+CSCS?   +CSC
53 3a 20 22 50 43 43 50 34 33 37 22 0d 0a 0d 0a | S: "PCCP437"   
4f 4b 0d                                        | OK             
Received message type 63
Initialisation completed
Message sent: 0x06 / 0x0007
41 54 2b 47 4d 4d 0d                            | AT+GMM         
write: [AT+GMM<cr>]
read : [AT+GMM<cr><cr><lf>Nokia 6301<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x001b
02 41 54 2b 47 4d 4d 0d 0d 0a 4e 6f 6b 69 61 20 |  AT+GMM   Nokia
36 33 30 31 0d 0a 0d 0a 4f 4b 0d                | 6301    OK     
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 49 0d                         | AT+CGMI        
write: [AT+CGMI<cr>]
read : [AT+CGMI<cr><cr><lf>Nokia<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0017
02 41 54 2b 43 47 4d 49 0d 0d 0a 4e 6f 6b 69 61 |  AT+CGMI   Nokia
0d 0a 0d 0a 4f 4b 0d                            |     OK         
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 52 0d                         | AT+CGMR        
write: [AT+CGMR<cr>]
read : [AT+CGMR<cr><cr><lf>V 04.62<cr><lf>05-12-07<cr><lf>RM-322<cr><lf>(c) Nokia            <cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0042
02 41 54 2b 43 47 4d 52 0d 0d 0a 56 20 30 34 2e |  AT+CGMR   V 04.
36 32 0d 0a 30 35 2d 31 32 2d 30 37 0d 0a 52 4d | 62  05-12-07  RM
2d 33 32 32 0d 0a 28 63 29 20 4e 6f 6b 69 61 20 | -322  (c) Nokia
20 20 20 20 20 20 20 20 20 20 20 0d 0a 0d 0a 4f |                O
4b 0d                                           | K              
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 53 4e 0d                         | AT+CGSN        
write: [AT+CGSN<cr>]
read : [AT+CGSN<cr><cr><lf>358983011914525<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0021
02 41 54 2b 43 47 53 4e 0d 0d 0a 33 35 38 39 38 |  AT+CGSN   35898
33 30 31 31 39 31 34 35 32 35 0d 0a 0d 0a 4f 4b | 3011914525    OK
0d                                              |                
Received message type 06
Message sent: 0x00 / 0x000d
41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d          | AT+CPMS="SM"   
write: [AT+CPMS="SM"<cr>]
read : [AT+CPMS="SM"<cr><cr><lf>ERROR<cr><lf>]
Message received: 0x00 / 0x0016
03 41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d 0d 0a |  AT+CPMS="SM"  
45 52 52 4f 52 0d                               | ERROR          
Received message type 00
lowlevel.c:435 error: 8, Unknown error - well better than nothing!!
Message sent: 0x00 / 0x000d
41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d          | AT+CPMS="SM"   
write: [AT+CPMS="SM"<cr>]
read : [AT+CPMS="SM"<cr><cr><lf>ERROR<cr><lf>]
Message received: 0x00 / 0x0016
03 41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d 0d 0a |  AT+CPMS="SM"  
45 52 52 4f 52 0d                               | ERROR          
Received message type 00
lowlevel.c:435 error: 8, Unknown error - well better than nothing!!
Message sent: 0x00 / 0x000d
41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d          | AT+CPMS="SM"   
write: [AT+CPMS="SM"<cr>]
read : [AT+CPMS="SM"<cr><cr><lf>ERROR<cr><lf>]
Message received: 0x00 / 0x0016
03 41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d 0d 0a |  AT+CPMS="SM"  
45 52 52 4f 52 0d                               | ERROR          
Received message type 00
lowlevel.c:435 error: 8, Unknown error - well better than nothing!!
Message sent: 0x00 / 0x000d
41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d          | AT+CPMS="SM"   
write: [AT+CPMS="SM"<cr>]
read : [AT+CPMS="SM"<cr><cr><lf>ERROR<cr><lf>]
Message received: 0x00 / 0x0016
03 41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d 0d 0a |  AT+CPMS="SM"  
45 52 52 4f 52 0d                               | ERROR          
Received message type 00
lowlevel.c:435 error: 8, Unknown error - well better than nothing!!
Message sent: 0x00 / 0x000d
41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d          | AT+CPMS="SM"   
write: [AT+CPMS="SM"<cr>]
read : [AT+CPMS="SM"<cr><cr><lf>ERROR<cr><lf>]
Message received: 0x00 / 0x0016
03 41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d 0d 0a |  AT+CPMS="SM"  
45 52 52 4f 52 0d                               | ERROR          
Received message type 00
lowlevel.c:435 error: 8, Unknown error - well better than nothing!!
Message sent: 0x00 / 0x000d
41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d          | AT+CPMS="SM"   
write: [AT+CPMS="SM"<cr>]
read : [AT+CPMS="SM"<cr><cr><lf>ERROR<cr><lf>]
Message received: 0x00 / 0x0016
03 41 54 2b 43 50 4d 53 3d 22 53 4d 22 0d 0d 0a |  AT+CPMS="SM"  
45 52 52 4f 52 0d                               | ERROR          
Received message type 00
lowlevel.c:435 error: 8, Unknown error - well better than nothing!!
Too many consecutive errors, restarting connection.

 

Using Gnokii 0.6.29 , Nokia 6301, Ubuntu 11.04 Desktop 32bit

 

Any suggestions please guys?

 

Cheers

 

Kind Regards

Andrew

 

From: gnokii-users-bounces+address@hidden [mailto:gnokii-users-bounces+address@hidden On Behalf Of Michael Bochner
Sent: 22 December 2011 08:01
To: Discussion forum for gnokii users.
Cc: address@hidden
Subject: Re: Alerts through Nagios very temperamental

 


Andrew

   Are you using the smsd?   That would resolve the contention problem.

 

The smsd is a daemon that comes with gnokii, it reads from a mysql database table. 

  Your nagios notification script would  write a row into the table. Meanwhile the smsd scans the table for unsent messages. 

Thats how we do it at my site.

 

Cheers

  Michael
-----------------------------

 


On 21/12/2011, at 4:01 AM, Andrew Thompson <address@hidden> wrote:

Hi All,

 

Can anybody help me with Nagios notifications?

 

Basically situation is this

 

Host goes down……….

 

The first notification is a text and email.

 

The text goes to 2 admins.

 

Use Gnokii and a Nokia 6301 to send the texts

 

But now the problem………

 

I don’t get alot of the text messages and from my own digging its because sometimes they are being sent at the exact same second and gnokii must refuse both of them rather than queue them.

 

Example of a scenario taken just 25 minutes ago (notification times)

 

HOST………………….EML ADMIN 1……..EML ADMIN 2..…..TXT ADMIN 1…….TEXT ADMIN 2

 

SWITCH1………………..16:24:37……………..16:24:37………………16:24:37………….…16:24:46

 

With the above both admins received the text message

 

 

 

Then another test on the same host 10 minutes ago threw this out

 

HOST………………….EML ADMIN 1……..EML ADMIN 2..…..TXT ADMIN 1…….TEXT ADMIN 2

 

SWITCH1………………..16:41:09……………..16:41:09………………16:41:09………….…16:41:09

 

With the above neither admin received a text message at all

 

Anybody give me any help?

 

Why sometime does nagios tell gnokii to send 2 messages apart and then other times it tells gnokii to send 2 texts at the exact same moment?

 

Cheers

 

 

Kind Regards

Andrew

 

T: 01386 834000
F: 01386 834100


address@hidden
www.fulgent.co.uk

 


Fulgent Technologies Limited, Haddonsacre, Station Road, Offenham, Evesham, WR11 8JJ. This communication contains information which is confidential and may also be privileged or protected by copyright. It is for the exclusive use of the addressee. If you are not the addressee please note that any distribution, reproduction, copying, publication or use of this communication or the information is prohibited. If you have received this communication in error, please telephone us immediately and also delete the communication from your computer.

 

_______________________________________________
gnokii-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/gnokii-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]