Re: Email Notification for Traps. (1126 Views)
Reply
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 1 of 34 (1,147 Views)
Accepted Solution

Email Notification for Traps.

Hi,

 

 

I'm a beginner on NNM and I would like to send an email automatically when an incident is registered. I use NNMi 9.00 on windows 2008.

 

Can everyone help me to configure this please?

Note: please share steps and also some examples.

 

Thanks

 709

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 2 of 34 (1,121 Views)

Re: Email Notification for Traps.

Hi,

 

Check the below link that will help you for email alert part.

 

http://support.openview.hp.com/selfsolve/document/KM793321  there is a script called email.ovpl

 

 

Regards,

Chetan J

 

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 3 of 34 (1,117 Views)

Re: Email Notification for Traps.

Hi,

 

Please can you send me as a attachment because i can't  open that site.please help me to send this file.

 

 

http://support.openview.hp.com/selfsolve/document/KM793321  there is a script called email.ovpl

 

 

Thanks

 

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 4 of 34 (1,120 Views)

Re: Email Notification for Traps.

Hi,

 

Please find attached email.ovpl.

 

Regards,

chetan J

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 5 of 34 (1,128 Views)

Re: Email Notification for Traps.

Dear

 

I can't find any attachment file plz help.

 

thanks

709

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 6 of 34 (1,132 Views)

Re: Email Notification for Traps.

Hi,

 

Sorry,

 

I attached zip file for the same.

 

Regards,

Chetan J

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 7 of 34 (1,132 Views)

Re: Email Notification for Traps.

 

 

Dear Thanks,

 

I got the file but no document so can you share with me your steps how to use this file give me real time example i am new for this option please.

 

 

Thanks

709

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 8 of 34 (1,174 Views)

Re: Email Notification for Traps.

Hello 709,

 

you need to download blat.exe for the email alerting part.

 

for blat you need smtp server with port 25 

 

and edit the email.ovpl file as per your requirements.

 

Regards,

Chetan

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 9 of 34 (1,178 Views)

Re: Email Notification for Traps.

 

 

Dear Chetan_J

 

Thanks for your reply on my issue in nnm I 9.0. Please can you share with me the screenshot for nnm I 9.0 how to place it and where to keep blat.exe itself, and it will take all the critical traps or all of them to the email groups. And also we can send it from this to yahoo, Gmail etc.

 

Note: Please just share screenshots with me in nnm where to do changes or no need just tell I am doing this first time you can understand it is not easy for the first time.

 

 

Thanks

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 10 of 34 (1,174 Views)

Re: Email Notification for Traps.

can you share your email_id ???
So i can share document for the same.
Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 11 of 34 (1,185 Views)

Re: Email Notification for Traps.

Hi,

 

Dear Realy Thanks for your reply about my post, my email is najeeb_ccie@yahoo.com. and please send the setps in word files so i can follow that how to use it and also in nnm side what i have to do, as you know there is a option for that called action what we have to mention i.e it will take every traps or we have to specify some.

 

thanks

najeeb

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 12 of 34 (1,180 Views)

Re: Email Notification for Traps.

Hello 709,

 

 

1. You need 1st configure the  blat.exe using command prompt. For the blat you need smtp server and 25 port should be open for email.

 

2. You need to configured the email.ovpl file, in that you have to provide sender_email_id, smtp_server_hostname, receiver_email_id.

 

3. You have configured Event Management  Event >> Event >> Action >>  (life cycle)Registration >> (Command Type) ScriptOrExecuatble file >> c:\blat.exe c:\temp\nodedown.txt -t mymail@data.com -attach c:\temp\ nodedown.txt -subject MySubjectName

 

I think this information will helpful for the your email configuration part. 

 

Regards,

Chetan_J

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 13 of 34 (1,168 Views)

Re: Email Notification for Traps.

Dear,

 

Thanks for reply on my post.

 

1. You need 1st configure the  blat.exe using command prompt. For the blat you need SMTP server and 25 ports should be open for email.

 1) Point no 1 is clear to me.

 2) Point no 2 I have to ask some points, i.e. sender email, hotstname mean name server and   receive email only one or I can add many.

 3) Point no 3 I have some question please, we have to configure i.e interface down, node down, mean all the critical events which we want to send mail we have to do it.

 

Can you please let works i.e. node down an interface down can you create for me these two events how to send these two and also you did not talk about this text file c:\temp\nodedown.txt

Is it already in this address or we have to create this also for each and every event which we want to send email.

 

Thanks an advance

 

 

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 14 of 34 (1,163 Views)

Re: Email Notification for Traps.

Hello 709,

 

Regarding 2nd, you can send to many user just you put comma (,) between the two email_id's 

 

And

 

regarding the 3rd point, you have to configured for each event that you need the email part.

 

 

Regards,

 

Chetan_J

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 15 of 34 (1,161 Views)

Re: Email Notification for Traps.

 

 

Dear I am sharing with you my SMTP server total information and requesting you to help me in the mail. ovpl file where and how to put this will help me to understand as better understand that scripts are very difficult to understand and small (.) can stop and create errors. Blat address where to place and as I requested you to create for me to send for interface down and node down. Please help,

 

 

SMTP server: mail. MOS. Nov. om (IP addresses are 10.10.7.8 and 10.10.7.9)

Email addresses where alerts need to be sent: alerts@mos.mov.om

Blat address    (C:/Program Files (x86)/blat" ;) anywhere you mention I will place that

 

 

Thanks

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 16 of 34 (1,151 Views)

Re: Email Notification for Traps.

Hello 709,

 

Please find attached email.ovpl for you refernce. It may helpful to you.

 

 

Regards,

Chetan_J

 

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 17 of 34 (1,144 Views)

Re: Email Notification for Traps.

Hello Dear,

 

Thanks for your quick reply on my post, please can you check my attachment file to confirm that it is enough to send mail what I am sending you is the part only form the mail.ovpl file the only part you change for me so I make sure we have to do only this part next time if needed.

 

Note: -Please also share  NNM i side also how to do it as I send ask or interface

 

down and node down events.  From step 1 start with me this is first time dear.

 

Thanks

 

 

Spoiler
Mee Too

 

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 18 of 34 (1,139 Views)

Re: Email Notification for Traps.

Hello 709,

you to delete email_id "another_email_id" from the email.ovpl

Chetan_J
Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 19 of 34 (1,126 Views)

Re: Email Notification for Traps.

Dear,

 

Good Day,

 

Can you please show me how to add action on  nnm i  side, because mail.ovpl done as you send me, now how to make nnm side for done down and also for interface down.  just do for me this time and the rest i will do plz and thanks in advance.

 

Thanks

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 20 of 34 (1,125 Views)

Re: Email Notification for Traps.

Dear,

 

This is the point now we are working point 1 and 2 are clear as per your knowledge and thanks for your replys on my post.

 

 

3. You have configured Event Management  Event >> Event >> Action >>  (life cycle)Registration >> (Command Type) ScriptOrExecuatble file >> c:\blat.exe c:\temp\nodedown.txt -t mymail@data.com -attach c:\temp\ nodedown.txt -subject MySubjectName

 

Just for help me to do .  

 

1)Node down

2)Interface down.

 

Thanks.

 

Please use plain text.
Regular Advisor
Chetan_J
Posts: 166
Registered: ‎01-02-2013
Message 21 of 34 (1,114 Views)

Re: Email Notification for Traps.

Hello,

If you find my posts resolves your issue, please be sure to mark it as an accepted solution,If you are satisfied with anyone’s response please remember to give them a KUDOS and show your appreciation.
Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 22 of 34 (1,096 Views)

Re: Email Notification for Traps.

 

Dear,

 

This is the point now we are working point 1 and 2 are clear as per your knowledge and thanks for your replys on my post.

 

 

3. You have configured Event Management  Event >> Event >> Action >>  (life cycle)Registration >> (Command Type) ScriptOrExecuatble file >> c:\blat.exe c:\temp\nodedown.txt -t mymail@data.com -attach c:\temp\ nodedown.txt -subject MySubjectName

 

Just for help me to do .  

 

1)Node down

2)Interface down.

 

Thanks.

Please use plain text.
Regular Advisor
MohanSekar
Posts: 147
Registered: ‎03-01-2012
Message 23 of 34 (1,090 Views)

Re: Email Notification for Traps.

Hello 709,

 

Please find the script to be created:

 

#!/opt/OV/nonOV/perl/a/bin/perl

 

# Author: Mohan Sekar

# Date: 30-09-2012

# Purpose: Send Email Alert

 

use Net::SMTP;

 

use strict;

 

my $DISABLE = '0'; # set this to 1 to disable this script (for maintenance) and 0 to enable.

exit if ($DISABLE);

 

# Configure the mail server IP/name here

 

my $MAILHOST = 'mail server address';

 

# format for multiple entries : my @EMAIL_TO = ( 'what.ever@anydomain.com', 'das.fsfswf@sdfsdfs.com');

 

my @EMAIL_TO = ('what.ever@anydomain.com', 'das.fsfswf@sdfsdfs.com');

 

my $FROM = 'Email address of the sender';

 

my ($name,$severity,$snn,$sln,$lot,$mga,$sourceObjectName)=@ARGV;

 

# connect to the smtp server

 

my $smtp = Net::SMTP->new($MAILHOST, Timeout => 10) or die "Unable to connect to mail

host :";

 

foreach my $address (@EMAIL_TO) {

        $smtp->mail($address);

 

$smtp->to($address);

 

$smtp->data();

 

$smtp->datasend("From: $FROM\n");

 

$smtp->datasend("To: $address\n");

 

$smtp->datasend("Subject: NodeDown :: Critical :: $sln \n\n");

 

$smtp->datasend("\nIncident Details\n\n");

 

$smtp->datasend("\nDevice Name: $snn\n\n");

$smtp->datasend("\nDevice IP address: $mga\n\n");

$smtp->datasend("\nSeverity: $severity\n\n");

$smtp->datasend("\nDate/Time: $lot\n\n");

$smtp->datasend("\nEvent Description: $name\n\n\n");

 

$smtp->datasend("Nodename:$sourceObjectName\n\n");

 

#$smtp->datasend("Interface:$sourceObjectName\n\n");

 

 

$smtp->datasend("Email alert sent from HP");

 

$smtp->datasend;

 

$smtp->dataend();

my $log_todate = `echo %date:~10,4%-%date:~4,2%-%date:~7,2%`;

chop $log_todate;

my $nodealert_time = `time \/t`;

chop $nodealert_time;

my $mail_log_file = "D:\\NNM_data\\log\\nnm\\NodeAlert.$log_todate";

open (MAIL_LOG_FILE,">>$mail_log_file");

print MAIL_LOG_FILE "TimeStamp : $nodealert_time, MailTo: $address, Subject: $name :: $severity :: $sln\n";

close (MAIL_LOG_FILE);

}

$smtp->quit;

 

Please follow the steps below to create email notifications for NodeDown:

 

 

 

Step 1: Copy the above script into a notepad and modify with your own information and save it as a perl file in the below directory:

 

cd %NNMDataDir%\shared\nnm\actions\nodedown.ovpl

 

and copy the same script into another file and the subject line to Node UP and save it in the same directory as nodeup.ovpl

 

Step 2: Goto Configuration Workspace -> Incident configuration -> Management Events -> Open NodeDown event -> Select Actions Tab

 

Step 3: Click New under Life Cycle Transition workspace

 

Step 4: a. Select Lifecycle State as Registered

               b. Select command type as ScriptorExecutable if using perl

               c. In the command tab give 'nodedown.ovpl $name,$severity,$snn,$sln,$lot,$mga,$sourceObjectName'

 

Step 5: Repeat Step 3 to 4 except in 4.a. select Lifecycle state as closed and in 4.c give the command as 'nodeup.ovpl $name,$severity,$snn,$sln,$lot,$mga,$sourceObjectName'

 

Step 6: Save the configuration

 

Note: Don't forget to select the Enabled option in the Actions Tab and the Enabled option under the Basics configuration once you open the event.

 

Follow the above steps for Interface Down as well with the required modifications.

 

Let me know if this helps.

 

Regards

 

Mohan Sekar

Please use plain text.
Frequent Advisor
709
Posts: 36
Registered: ‎12-25-2012
Message 24 of 34 (1,048 Views)

Re: Email Notification for Traps.

Hello

 

Mr.Mohan,

 

Thanks for your reply on my post dear i do the below steps you share wiht me please check wiht me if i missed any point becasue i not geting any nodedown email.

I do the following steps and no email stil waiting your supports on my issue to create email notifications for NodeDown:
----------------------------------------------------------------------------------------------------------------------
Step 1: Copy the above script into a notepad and modify with your own information and save it as a perl file in the below directory:

D:\ProgramData\HP\HP BTO Software\shared\nnm\actions\nodedown.ovpl


Step 2: Goto Configuration Workspace -> Incident configuration -> Management Events -> Open NodeDown event -> Select Actions Tab


Step 3: Click New under Life Cycle Transition workspace


Step 4: a. Select Lifecycle State as Registered
               b. Select command type as ScriptorExecutable if using perl
               c. In the command tab give 'nodedown.ovpl $name,$severity,$snn,$sln,$lot,$mga,$sourceObjectName'


Step 5: Save the configuration

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


Note: i select the Enabled option in the Actions Tab and the Enabled option under the Basics configuration once you open the event.
Please help me out of this issue i am very new for version 9 i and please start from step one we may need to install blat if yes then also share wiht me the steps also for that

i am attaching my nodedown.ovpl if any thing need to be change.

 

Thanks
Regards
Najeeb





Please use plain text.
Regular Advisor
MohanSekar
Posts: 147
Registered: ‎03-01-2012
Message 25 of 34 (1,038 Views)

Re: Email Notification for Traps.

Hi 709,

 

I could see that you have the file created as a text file and not as a perl file.

 

After copying the script in a notepad you should save it as 'nodedown'.ovpl.

 

Note: You should select the file type as 'All files' instead of text file.

 

Regards

 

Mohan Sekar

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation