SMS alerts in Nagios

Hi,

I have been using Nagios for the past 2 3 months and it has been working great.But now i am trying to send SMS alerts via a clickatell account.But the problem is that i am not able to log into the clickatell account from my Nagios server but i can do it from my internet explorer with the same user details.Has anyone faced this problem before.

Soumna

i’d try asking the service provider. Possibly they already some demoworking demo script :wink:

Luca

I haven’t seen anyone using the solution we have here - bluetooth. The monitoring server has gnokii, the blueZ stack and a Belkin bluetooth USB dongle. Nearby is an old Nokia 6310i (permanently connected to its power supply) paired with the monitoring server and able to send SMS to a preset number.

In /etc/nagios/misccommands.cfg is the following section:

‘notify-by-sms’ command definition

define command{
command_name notify-by-sms
command_line /usr/bin/printf “Svce: $SERVICEDESC$\nHost: $HOSTNAME$\nAddr: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$” | /usr/bin/gnokii --sendsms 0798XXXXXX

Just add “notify-by-sms” to your callout contact in /etc/nagios/contacts.cfg and you’re set.

When the escalation state is triggered, nagios sends the command to gnokii which sends the message via SMS.

Well, yeah, but if you’re going to use bluetooth then the phone has to stay within range of the transmitting device, doesn’t it? In that case, you might as well save yourself the trouble of configuring all that and just send alerts to e-mail, since the phone has to stay relatively close to the nagios server anyways.

From the jist of the e-mail, the phone is kept nearby to the server as it’s not used for anything else.

The phone thats connected by bluetooth is not used for anything but to send the SMS - not receive it.

Yes, but as komfort says, the phone is dedicated to the monitoring server. Even if the network is out, the SMS will still get sent.

We just need another server and bluetooth phone now - to monitor the monitor. :slight_smile:

Ochainnm Having been won over by your method I thought I’d give it a try. Not having much luck though !

Fedora/BlueZ recognise the Bluetooth adapter

hci0: Type: USB
BD Address: 00:13:10:5D:57:55 ACL MTU: 377:10 SCO MTU: 16:0
UP RUNNING PSCAN ISCAN
RX bytes:5119 acl:0 sco:0 events:201 errors:0
TX bytes:512 acl:0 sco:0 commands:33 errors:0

But gnokii keeps erroring out. Can you let me know the contents of your gnokiirc file please? Many thanks in advance !

(PS. I’m also using an old 6310i)
Edited Thu Jan 05 2006, 02:18PM ]

This is the stripped version:

# Ochainn's Nagios monitoring server Gnokii config

[global]

port = 00:60:57:21:EB:57

model = 6310i

initlength = default

connection = bluetooth

use_locking = yes

serial_baudrate = 19200

rfcomm_channel = 1

smsc_timeout = 10

[gnokiid]

bindir = /usr/local/sbin/

TELEPHONE = 07785283NNN

[disconnect_script]

[logging]

debug = off

rlpdebug = off

xdebug = off

I’ve been having problems with sending SMS notification recently that I’ve just sorted. One of the problems I discovered is that there are differences between phone setups in America and the UK (where I’m based).

If your my side of the pond let me know and I’ll give you a run through of my set-up, might help.

Andrew

Thanks, I’ll give that a go later on today.

At the moment I resorted to using an old serial data cable, I was able to understand those instructions !