passing macro variables to shell script

Ludo Bosmans ludo.bosmans at xtenso.be
Fri May 21 14:00:15 CEST 2004


Jason,
 
As i understood, gnokii is working and nagios can send sms's, but in case
more sms's need to be send to several people, the first gnokii process is
occupying the serial com port and additional sms's or lost.
 
Check next site:
Gnokii-smstools provides a way to spool short messages (SMS) using a Nokia
cellphone. It takes advantage of both the Nokia phone driver from gnokii and
the queueing code from SMS-Tools. 
http://juraj.bednar.sk/work/software/smstools/gnokii-smstools/
<http://juraj.bednar.sk/work/software/smstools/gnokii-smstools/> 
 
kind regards,
 
ludo

-----Original Message-----
From: Onsite DeTeWe [mailto:Onsite.DeTeWe at firstgroup.com]
Sent: vrijdag 21 mei 2004 13:29
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] passing macro variables to shell script



Hi all, 

In an attempt to SMS to a number of recipients using a serial connected
mobile phone and gnokii I have run into a slight snag. 

The only way you can get gnokii to send to multiple destinations is to set
up a script like this 

for x in 040404040 1414141 
do 
echo 'Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$' |
/usr/local/bin/gnokii --sendsms $x 
sleep 60 (if you need this?) 
done 

And run this script from the misccommands.cfg file when the trigger is
activated.  Of course it would be nice to have the macro $xxx$ values sent
as well but this does not happen in the above example. 

Does anyone have any idea if it is possibe to parse variables from nagios to
an external shell script. 

Kind reards 

Jason

**********************************************************************
This message is confidential. It may not be disclosed to, or used by, 
anyone other than the addressee. If you receive this message in 
error, please advise us immediately.

Internet email is not necessarily secure. First does not accept
responsibility for changes to any email which occur after the email
has been sent. Attachments to this email could contain software
viruses which could damage your system. First have checked the
attachments for viruses before sending, but you should virus-check
them before opening.

http://www.firstgroup.com
**********************************************************************


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040521/34e177e0/attachment.html>


More information about the Users mailing list