OT: SNMP Trap to SMS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

OT: SNMP Trap to SMS

L4 Transporter

Hello

I have question not directly connected to PA but I think here are peoples who using such solution or are interested in Smiley Wink

I spend over a hour on googling for simple and free solution for recieving SNMP trap and sending alert by usb modem  as a SMS but I didn't find anything interesting.

I think that could be VM with Linux and snmptrapd and ie  HUAWEI E172 and some scripts, Could You give some working examples for it?

With regards

SLawek

6 REPLIES 6

L6 Presenter

Hi SLV,

I need more detail on requirement. USB modem is used only for data transfer from connected device. Basically it converts digital signals into analog and send across telephone network.

Isnt IP network of end device responsible for SNMP ?

If Yes, then end device can send SMS. and USB device can forward it across telephone network. Correct me if I am wrong.

Regards,

Hardik Shah

Hi

USB modem of course are dedicated for internet access, but also are in my opinion good device for sms sending, ie Huawei modems accept AT command for sending SMS (I played with gnoki and Nokia 62xx/63xx phones but this isn't a stable solution).

Yes, end device is responsible for SNMP but think how to get alert on Your mobile if something is going wrong?

You need "something" that will catch snmp trap and send alert to Your mobile.

I have only one ISP (without failover) so I'm looking for solution different than email/sms sended by internet.

I hope that explain my needdings if not please ask.

Regards

SLawek

Hi

I had the same problem and installed ZABBIX as my SNMP-Tool of choice.
This allowed me to trigger actions for traps or to high values in very different ways. One of it is to trigger a shell script.
In my setup I use this to send data to a GSM Modul in the network and to send alarm levels to a network based LED indicator.

Cheers,

Chris

Hi Chris

I'm using Zabbix appliance too, could You tell more about catching traps on such platform?

Could You share Your script (I have also ability to use our Phone Gateway wchich has GSM module for sending SMS).

Regards

Slawek

Hi Slawek

I used this wiki entry to start with: http://www.zabbix.org/wiki/Start_with_SNMP_traps_in_Zabbix#Configure_Zabbix

Sure, but this is for a Arduino Based DIY solution. I grab a copy asap.

Have a look at his documentation for alert scripts: https://www.zabbix.com/documentation/2.0/manual/config/notifications/media/script

If you like, I can also give you a copy of my script sending alerts to Prowl

Cheers,

Chris

Here is the script I use to send alerts with prowl and the led tower:

PROWLPATH=/etc/zabbix/scripts/prowl.pl

LEDPATH=/etc/zabbix/scripts/led.sh


APPLICATION="Zabbix"

APIKEY=$1

EVENT=$2

NOTIFICATION=$3

PRIORITY=0

HEADER=$(echo $EVENT | awk -F: '{print $1}')

PRIORITY=0

case "$HEADER" in

"Info"|"Information"                            ) PRIORITY=-2 ;;

"Warning"|"WARNING"                             ) PRIORITY=-1 ;;

"Problem"|"PROBLEM"|"Average"|"AVERAGE"         ) PRIORITY=0 ;;

"High"|"HIGH"                                   ) PRIORITY=1 ;;

"Disaster"|"DISASTER"|"Emergency"|"EMERGENCY"   ) PRIORITY=2 ;;

"Recovery"|"RECOVERY"                           ) exit 0 ;;

esac


#HERE WE GO! Send the data from Zabbix Alert to the Prowl Script

${PROWLPATH} -apikey=${APIKEY} -application="${APPLICATION}" -event="${EVENT}" -notification="${NOTIFICATION}" -priority=${PRIORITY}


#AND AGAIN! Send the data to the LED Tower

${LEDPATH} -event="${EVENT}" -priority=${PRIORITY}

$1, in this case the API-Key for Prowl is the field "Send to" of the Media assigned to a Zabbix-User:

Bildschirmfoto 2014-10-27 um 09.51.08.png

Hope this helps you to start.

Cheers,

Chris

  • 3428 Views
  • 6 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!