Welcome, Guest
Please Login or Register.    Lost Password?

New article : Sending emails on SNMP Traps
(1 viewing) (1) Guest
Get quick Unbrowse SNMP help from Unleash Networks Engineers. The fastest way.
Go to bottomPage: 123
TOPIC: New article : Sending emails on SNMP Traps
#263
New article : Sending emails on SNMP Traps 6 Months, 1 Week ago Karma: 1
It helps to keep track of SNMP Trap activity on your network even if you are not around. Making this happen is easy using the Unbrowse SNMP scripting interface. You get the performance win of a native C++ multithreaded trap receiver and the flexibility of a language like Ruby.

I just posted a new article along with a sample Ruby script to accomplish this. You just need to fill in your email server details. Needless to say all versions of SNMP (v1/v2/v3) and IPv4 and IPv6 are supported. You can even decrypt and authenticate SNMPv3 traps.


Check out the article at - Sending emails on SNMP Traps"Sending emails on receiving SNMP Traps"


Enjoy !
vivek [unleash]
Senior Boarder
Posts: 50
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/01/21 22:20 By vivek [unleash].
The administrator has disabled public write access.
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
 
#275
Re:New article : Sending emails on SNMP Traps 5 Months, 2 Weeks ago Karma: 0
I am looking to have Unbrowse send out emails only when certain criteria are met (certain severity) and then only send out emails on those alarms. Do you think that is possible?
denvaa
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#276
Re:New article : Sending emails on SNMP Traps 5 Months, 2 Weeks ago Karma: 1
Yes. You can match any criteria you want.

SNMP Traps dont have a concept of priority, so you have to use Unbrowse to assign severity for each trap you are interested in (Traps > Manage Profiles > New Profile)


Alternately if you know the OIDs of the traps you want to trigger emails you can simply add those in the script.


Can you edit the Ruby script (see first post in this thread) to add your custom logic ? If not , reply here and we can help you out

Vivek
Unleash
vivek [unleash]
Senior Boarder
Posts: 50
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
 
#278
Re:New article : Sending emails on SNMP Traps 5 Months, 1 Week ago Karma: 0
Thanks for your reply. What we are looking to do is have one alert that sends out email to one email address for a certain severity and to another email if the severity is critical. I don't know Ruby scripting very well is there any way you could point me in the right direction?

I'm not looking for an email every 30 minutes with a summary i want this more to be an email every time a trap comes in and sent to the correct person based on either the severity set by Unbrowse or by the var bind for severity which would be the best situation for us.


Thanks,

Donny
denvaa
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#279
Re:New article : Sending emails on SNMP Traps 5 Months, 1 Week ago Karma: 1
Yes, this can be done quite easily. I will post a script here that can do this.

1. You define severity levels based on observed varbind values or based on the trap itself.

2. When you get a trap, you check its severity and set the "To" email field to the correct target.

This would work well if the volume of traps are not high. What if you get 20 traps at once ? Do you want a consolidated email or 20 separate emails ?
vivek [unleash]
Senior Boarder
Posts: 50
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Vivek R
Unleash Networks
Support : www.unleashnetworks.com/forums
 
#280
Re:New article : Sending emails on SNMP Traps 5 Months, 1 Week ago Karma: 0
I have attached the output i am getting after running the script you mentioned. It says it is sending email but it is never sent.

ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]


C:Documents and SettingsAdministratorDesktop>dir
Volume in drive C has no label.
Volume Serial Number is 70EA-E1A5

Directory of C:Documents and SettingsAdministratorDesktop

02/17/2010 10:53 AM <DIR> .
02/17/2010 10:53 AM <DIR> ..
02/12/2010 10:26 AM 7,934 Customers.CSV
02/12/2010 10:29 AM <DIR> DOWNLOADS
02/17/2010 10:52 AM 4,764 fileRead.php
02/12/2010 09:18 AM <DIR> mibs
02/17/2010 09:20 AM 68,202 My Devices
02/17/2010 11:02 AM 4,757 t2mail.rb
02/11/2010 02:09 PM 1,978 Unbrowse SNMP.lnk
5 File(s) 87,635 bytes
4 Dir(s) 26,905,776,128 bytes free

C:Documents and SettingsAdministratorDesktop>t2mail.rb
Loaded the Unbrowse SNMP Trap Server
Starting ..
Listening for traps ..
"Unable to send mail 530 5.7.0 Must issue a STARTTLS command first. 6sm3295407yx
g.30n"
"Sent email at 2010-02-17 11:14:13 -0700"
stopping the trap receiver
C:/Documents and Settings/Administrator/Desktop/t2mail.rb:157:in `method_missing
': unknown property or method: `Stop' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
The RPC server is unavailable.
from C:/Documents and Settings/Administrator/Desktop/t2mail.rb:157:in `<
main>'

C:Documents and SettingsAdministratorDesktop>ruby t2email.rb
ruby: No such file or directory -- t2email.rb (LoadError)

C:Documents and SettingsAdministratorDesktop>t2mail.rb
Loaded the Unbrowse SNMP Trap Server
Starting ..
Listening for traps ..
"Unable to send mail 530 5.7.0 Must issue a STARTTLS command first. 5sm45912ywd.
29n"
"Sent email at 2010-02-17 11:19:01 -0700"
stopping the trap receiver
C:/Documents and Settings/Administrator/Desktop/t2mail.rb:157:in `method_missing
': unknown property or method: `Stop' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
The RPC server is unavailable.
from C:/Documents and Settings/Administrator/Desktop/t2mail.rb:157:in `<
main>'

C:Documents and SettingsAdministratorDesktop>
denvaa
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123