Archived community.zenoss.org | full text search
Skip navigation
8416 Views 3 Replies Latest reply: Jun 14, 2010 4:36 AM by may RSS
kimmoh Newbie 2 posts since
Mar 22, 2010
Currently Being Moderated

Jun 10, 2010 4:50 AM

Events to SMS message with gnokii

Hi,

i'm trying to get gnokii ( http://www.gnokii.org/ ) to send event alarms via sms message.

 

/ZenEventManager /Event  Commands /Gnokii-SMS-2

Command

/usr/local/bin/zenoss-gnokii.sh

 

Clear Command

/usr/local/bin/zenoss-gnokii-clear.sh

 

zenoss-gnokii.sh script:

-------------------------------------------------------------------------------

#!/bin/sh

mess=`echo "ZENOSS: Device ${device/getId} reported: ${evt/summary}" | cut -b "-155"`
/usr/bin/printf "$mess" | /usr/bin/gnokii --sendsms +358400xxxxx

-------------------------------------------------------------------------------

 

I get both sms messages on Failure and Clear, but only empty strings, no device or service name:

 

ZENOSS: Device reported:

 

Any idea how to get that information piped to gnokii ?

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points